修复response_headers错误的问题

This commit is contained in:
Liujian
2023-12-26 16:22:57 +08:00
parent d9067a54a5
commit efca7db53f
3 changed files with 6 additions and 9 deletions

View File

@@ -149,9 +149,9 @@ func (ctx *HttpContext) SendTo(scheme string, node eoscContext.INode, timeout ti
}
beginTime := time.Now()
ctx.response.responseError = fasthttp_client.ProxyTimeout(scheme, rewriteHost, node, request, &ctx.fastHttpRequestCtx.Response, timeout)
var responseHeader *fasthttp.ResponseHeader
var responseHeader fasthttp.ResponseHeader
if ctx.response.Response != nil {
responseHeader = &ctx.response.Response.Header
responseHeader = ctx.response.Response.Header
}
agent := newRequestAgent(&ctx.proxyRequest, host, scheme, responseHeader, beginTime, time.Now())
if ctx.response.responseError != nil {