mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Add support for the '*' path.
Mostly used by the following request: OPTIONS * HTTP/1.1
This commit is contained in:
parent
2c52a30b0a
commit
a4f8bb6573
3 changed files with 13 additions and 4 deletions
|
@ -68,6 +68,11 @@ request({http_request, Method, {abs_path, AbsPath}, Version},
|
|||
{ok, Peer} = Transport:peername(Socket),
|
||||
wait_header(#http_req{socket=Socket, transport=Transport, method=Method,
|
||||
version=Version, peer=Peer, path=Path, raw_qs=Qs}, State);
|
||||
request({http_request, Method, '*', Version},
|
||||
State=#state{socket=Socket, transport=Transport}) ->
|
||||
{ok, Peer} = Transport:peername(Socket),
|
||||
wait_header(#http_req{socket=Socket, transport=Transport, method=Method,
|
||||
version=Version, peer=Peer, path='*', raw_qs=[]}, State);
|
||||
request({http_request, _Method, _URI, _Version}, State) ->
|
||||
error_terminate(501, State);
|
||||
request({http_error, "\r\n"}, State) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue