aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-04-05 20:09:49 +0200
committerLoïc Hoguin <[email protected]>2011-04-05 20:09:49 +0200
commitd8a2fcf258189fc42e6b73e77c8ebf2cd52a75c9 (patch)
tree4c6d1e6256a1ffc8a32d9e5d27a24fb34890e5af /src
parent44e6f60b91489e8963a6c197b9897dbeb9d69573 (diff)
downloadcowboy-d8a2fcf258189fc42e6b73e77c8ebf2cd52a75c9.tar.gz
cowboy-d8a2fcf258189fc42e6b73e77c8ebf2cd52a75c9.tar.bz2
cowboy-d8a2fcf258189fc42e6b73e77c8ebf2cd52a75c9.zip
Don't automatically retrieve the peer information for the 'OPTIONS' method.
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_http_protocol.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl
index d3d288d..e345418 100644
--- a/src/cowboy_http_protocol.erl
+++ b/src/cowboy_http_protocol.erl
@@ -71,11 +71,10 @@ request({http_request, Method, {abs_path, AbsPath}, Version},
State#state{connection=ConnAtom});
request({http_request, Method, '*', Version},
State=#state{socket=Socket, transport=Transport}) ->
- {ok, Peer} = Transport:peername(Socket),
ConnAtom = version_to_connection(Version),
wait_header(#http_req{socket=Socket, transport=Transport,
connection=ConnAtom, method=Method, version=Version,
- peer=Peer, path='*', raw_path="*", raw_qs=[]},
+ path='*', raw_path="*", raw_qs=[]},
State#state{connection=ConnAtom});
request({http_request, _Method, _URI, _Version}, State) ->
error_terminate(501, State);