aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http_protocol.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy_http_protocol.erl')
-rw-r--r--src/cowboy_http_protocol.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl
index 0ea2cd9..82cf733 100644
--- a/src/cowboy_http_protocol.erl
+++ b/src/cowboy_http_protocol.erl
@@ -99,7 +99,9 @@ header({http_header, _I, 'Host', _R, Value}, Req=#http_req{path=Path,
wait_header(Req#http_req{host=Host, bindings=Binds,
headers=[{'Host', Value2}|Req#http_req.headers]},
State#state{handler={Handler, Opts}});
- {error, notfound} ->
+ {error, notfound, host} ->
+ error_terminate(400, State);
+ {error, notfound, path} ->
error_terminate(404, State)
end;
%% Ignore Host headers if we already have it.