mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Don't automatically retrieve the peer information for the 'OPTIONS' method.
This commit is contained in:
parent
44e6f60b91
commit
d8a2fcf258
1 changed files with 1 additions and 2 deletions
|
@ -71,11 +71,10 @@ request({http_request, Method, {abs_path, AbsPath}, Version},
|
||||||
State#state{connection=ConnAtom});
|
State#state{connection=ConnAtom});
|
||||||
request({http_request, Method, '*', Version},
|
request({http_request, Method, '*', Version},
|
||||||
State=#state{socket=Socket, transport=Transport}) ->
|
State=#state{socket=Socket, transport=Transport}) ->
|
||||||
{ok, Peer} = Transport:peername(Socket),
|
|
||||||
ConnAtom = version_to_connection(Version),
|
ConnAtom = version_to_connection(Version),
|
||||||
wait_header(#http_req{socket=Socket, transport=Transport,
|
wait_header(#http_req{socket=Socket, transport=Transport,
|
||||||
connection=ConnAtom, method=Method, version=Version,
|
connection=ConnAtom, method=Method, version=Version,
|
||||||
peer=Peer, path='*', raw_path="*", raw_qs=[]},
|
path='*', raw_path="*", raw_qs=[]},
|
||||||
State#state{connection=ConnAtom});
|
State#state{connection=ConnAtom});
|
||||||
request({http_request, _Method, _URI, _Version}, State) ->
|
request({http_request, _Method, _URI, _Version}, State) ->
|
||||||
error_terminate(501, State);
|
error_terminate(501, State);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue