Skip to content

Commit

Permalink
Merge pull request #1 from rambocoder/master
Browse files Browse the repository at this point in the history
peer_ip and peer_port fix for Cowboy
  • Loading branch information
choptastic committed Apr 7, 2012
2 parents 2afd6ce + fd38393 commit 1f8ff38
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cowboy_bridge_modules/cowboy_request_bridge.erl
Expand Up @@ -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) ->
Expand Down

0 comments on commit 1f8ff38

Please sign in to comment.