mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Log an error if HTTP request does not include Host header (EJAB-966)
SVN Revision: 2386
This commit is contained in:
parent
94a638da85
commit
b3eb800be1
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user