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: 2387
This commit is contained in:
parent
553969f0fd
commit
73f2fc76d9
@ -239,6 +239,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,
|
||||
|
Loading…
Reference in New Issue
Block a user