0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Reply with error 501 on all non absolute path URIs for now.

This commit is contained in:
Loïc Hoguin 2011-03-19 14:46:45 +01:00
parent 7ef67d08fe
commit 673c7e2cb5

View file

@ -68,6 +68,8 @@ 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, _URI, _Version}, State) ->
error_terminate(501, State);
request({http_error, "\r\n"}, State) ->
wait_request(State);
request({http_error, _Any}, State) ->