File tree 1 file changed +3
-3
lines changed
plugins/wasm-go/extensions/ai-proxy
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ func onHttpResponseHeaders(ctx wrapper.HttpContext, pluginConfig config.PluginCo
199
199
}
200
200
util .ReplaceResponseHeaders (headers )
201
201
202
- checkStream (& ctx , log )
202
+ checkStream (ctx , log )
203
203
_ , needHandleStreamingBody := activeProvider .(provider.StreamingResponseBodyHandler )
204
204
if ! needHandleStreamingBody {
205
205
ctx .BufferResponseBody ()
@@ -254,13 +254,13 @@ func onHttpResponseBody(ctx wrapper.HttpContext, pluginConfig config.PluginConfi
254
254
return types .ActionContinue
255
255
}
256
256
257
- func checkStream (ctx * wrapper.HttpContext , log wrapper.Log ) {
257
+ func checkStream (ctx wrapper.HttpContext , log wrapper.Log ) {
258
258
contentType , err := proxywasm .GetHttpResponseHeader ("Content-Type" )
259
259
if err != nil || ! strings .HasPrefix (contentType , "text/event-stream" ) {
260
260
if err != nil {
261
261
log .Errorf ("unable to load content-type header from response: %v" , err )
262
262
}
263
- ( * ctx ) .BufferResponseBody ()
263
+ ctx .BufferResponseBody ()
264
264
ctx .SetResponseBodyBufferLimit (defaultMaxBodyBytes )
265
265
}
266
266
}
You can’t perform that action at this time.
0 commit comments