Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

peer_ip and peer_port need to be cached and Cowboy returns a differen…

…t tuple format.
  • Loading branch information...
commit fd3839388079eca9c80d83fc7c1f8e97b17b8ec7 1 parent 2afd6ce
@rambocoder rambocoder authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/cowboy_bridge_modules/cowboy_request_bridge.erl
View
8 src/cowboy_bridge_modules/cowboy_request_bridge.erl
@@ -52,12 +52,16 @@ uri(ReqKey) ->
peer_ip(ReqKey) ->
?GET,
- {{IP, _Port, Req}} = cowboy_http_req:peer(Req),
+ {{IP, _Port}, NewReq} = cowboy_http_req:peer(Req),
+ NewRequestCache = _RequestCache#request_cache{request=NewReq},
+ ?PUT,
IP.
peer_port(ReqKey) ->
?GET,
- {{_IP, Port, Req}} = cowboy_http_req:peer(Req),
+ {{_IP, Port}, NewReq} = cowboy_http_req:peer(Req),
+ NewRequestCache = _RequestCache#request_cache{request=NewReq},
+ ?PUT,
Port.
headers(ReqKey) ->
Please sign in to comment.
Something went wrong with that request. Please try again.