Skip to content

Commit

Permalink
修复目标IP、目标端口获取失败的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Dot-Liu committed Nov 8, 2023
1 parent 00643c3 commit 89e4f8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions node/http-context/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 2 additions & 0 deletions node/http-context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 89e4f8c

Please sign in to comment.