Просмотр исходного кода

Don't automatically retrieve the peer information for the 'OPTIONS' method.

Loïc Hoguin 14 лет назад
Родитель
Сommit
d8a2fcf258
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      src/cowboy_http_protocol.erl

+ 1 - 2
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);