aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http_protocol.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-03-19 14:46:45 +0100
committerLoïc Hoguin <[email protected]>2011-03-19 14:46:45 +0100
commit673c7e2cb5dbf08e8f146d3146cfa883410f7db1 (patch)
treecabae5c9af74a97fea38a959a83080230bdad16e /src/cowboy_http_protocol.erl
parent7ef67d08fe05f6510b04b3cbc098ac0e8694e87c (diff)
downloadcowboy-673c7e2cb5dbf08e8f146d3146cfa883410f7db1.tar.gz
cowboy-673c7e2cb5dbf08e8f146d3146cfa883410f7db1.tar.bz2
cowboy-673c7e2cb5dbf08e8f146d3146cfa883410f7db1.zip
Reply with error 501 on all non absolute path URIs for now.
Diffstat (limited to 'src/cowboy_http_protocol.erl')
-rw-r--r--src/cowboy_http_protocol.erl2
1 files changed, 2 insertions, 0 deletions
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) ->