25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

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

SVN Revision: 2386
This commit is contained in:
Badlop 2009-07-23 14:50:58 +00:00
parent 94a638da85
commit b3eb800be1

View File

@ -235,6 +235,9 @@ process_header(State, Data) ->
request_headers=add_header(Name, Host, State)};
{ok, {http_header, _, Name, _, Value}} ->
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} ->
?DEBUG("(~w) http query: ~w ~s~n",
[State#state.socket,