From 673c7e2cb5dbf08e8f146d3146cfa883410f7db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 19 Mar 2011 14:46:45 +0100 Subject: Reply with error 501 on all non absolute path URIs for now. --- src/cowboy_http_protocol.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl index 3388f0d..0840b70 100644 --- a/src/cowboy_http_protocol.erl +++ b/src/cowboy_http_protocol.erl @@ -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) -> -- cgit v1.2.3