Browse Source

fix: avoid buffered data occurd in redirectPluginInvokeByIdentifier

Yeuoly 7 months ago
parent
commit
1974c683dc
1 changed files with 2 additions and 0 deletions
  1. 2 0
      internal/server/middleware.go

+ 2 - 0
internal/server/middleware.go

@@ -153,11 +153,13 @@ func (app *App) redirectPluginInvokeByPluginIdentifier(
 			break
 		} else if err != nil {
 			ctx.Writer.Write(buf[:n])
+			ctx.Writer.Flush()
 			break
 		}
 
 		if n > 0 {
 			ctx.Writer.Write(buf[:n])
+			ctx.Writer.Flush()
 		}
 	}
 }