mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
fix issue in http proxy when repeatable reading request body content (#2666)
This commit is contained in:
@ -44,6 +44,7 @@ func StartServer2() {
|
||||
)
|
||||
r.Request.URL.Path = proxyToPath
|
||||
g.Log().Infof(r.Context(), `server2:"%s" -> server1:"%s"`, originalPath, proxyToPath)
|
||||
r.MakeBodyRepeatableRead(false)
|
||||
proxy.ServeHTTP(r.Response.Writer.RawWriter(), r.Request)
|
||||
})
|
||||
s.SetPort(PortOfServer2)
|
||||
|
||||
Reference in New Issue
Block a user