Skip to content

Commit

Permalink
Merge pull request #134 from eolinker/feature/formatter_adding_variables
Browse files Browse the repository at this point in the history
修复目标IP、目标端口获取失败的问题
  • Loading branch information
Dot-Liu authored Nov 8, 2023
2 parents bf15397 + 89e4f8c commit 41f7c59
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 41f7c59

Please sign in to comment.