From d8a2fcf258189fc42e6b73e77c8ebf2cd52a75c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 5 Apr 2011 20:09:49 +0200 Subject: Don't automatically retrieve the peer information for the 'OPTIONS' method. --- src/cowboy_http_protocol.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3