修复目标IP、目标端口获取失败的问题

This commit is contained in:
Liujian
2023-11-08 11:43:49 +08:00
parent 00643c3046
commit 89e4f8c896
2 changed files with 4 additions and 0 deletions

View File

@@ -147,6 +147,8 @@ func (ctx *cloneContext) SendTo(scheme string, node eoscContext.INode, timeout t
agent.setStatusCode(504)
} else {
agent.setStatusCode(ctx.response.Response.StatusCode())
ctx.response.remoteIP = tcpAddr.IP.String()
ctx.response.remotePort = tcpAddr.Port
agent.setRemoteIP(tcpAddr.IP.String())
agent.setRemotePort(tcpAddr.Port)
}

View File

@@ -153,6 +153,8 @@ func (ctx *HttpContext) SendTo(scheme string, node eoscContext.INode, timeout ti
ctx.response.ResponseHeader.refresh()
agent.setRemoteIP(tcpAddr.IP.String())
agent.setRemotePort(tcpAddr.Port)
ctx.response.remoteIP = tcpAddr.IP.String()
ctx.response.remotePort = tcpAddr.Port
agent.setStatusCode(ctx.fastHttpRequestCtx.Response.StatusCode())
}
agent.responseBody = string(ctx.response.Response.Body())