25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Log an error if HTTP request does not include Host header (EJAB-966)

SVN Revision: 2387
This commit is contained in:
Badlop 2009-07-23 14:51:16 +00:00
parent 553969f0fd
commit 73f2fc76d9

View File

@ -239,6 +239,9 @@ process_header(State, Data) ->
request_headers=add_header(Name, Host, State)}; request_headers=add_header(Name, Host, State)};
{ok, {http_header, _, Name, _, Value}} -> {ok, {http_header, _, Name, _, Value}} ->
State#state{request_headers=add_header(Name, Value, State)}; State#state{request_headers=add_header(Name, Value, State)};
{ok, http_eoh} when State#state.request_host == undefined ->
?WARNING_MSG("An HTTP request without 'Host' HTTP header was received.", []),
throw(http_request_no_host_header);
{ok, http_eoh} -> {ok, http_eoh} ->
?DEBUG("(~w) http query: ~w ~s~n", ?DEBUG("(~w) http query: ~w ~s~n",
[State#state.socket, [State#state.socket,