Cowboy Bridge fix #15

Merged
merged 2 commits into from Nov 1, 2012
+5 −2
Split
@@ -47,7 +47,10 @@ path(ReqKey) ->
uri(ReqKey) ->
?GET,
- {RawPath, Req} = cowboy_http_req:raw_path(Req),
+ {RawPath, Req} = case cowboy_http_req:raw_path(Req) of
+ undefined -> {undefined, ok};
+ {P, R} -> {P, R}
+ end,
b2l(RawPath).
peer_ip(ReqKey) ->
@@ -59,7 +62,7 @@ peer_ip(ReqKey) ->
peer_port(ReqKey) ->
?GET,
- {{_IP, Port}, NewReq} = cowboy_http_req:peer(Req),
+ {Port, NewReq} = cowboy_http_req:port(Req),
NewRequestCache = _RequestCache#request_cache{request=NewReq},
?PUT,
Port.