mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Don't report Host mismatch as an error
This commit is contained in:
parent
f3af117108
commit
43e729293a
@ -310,10 +310,10 @@ process(LocalPath, #request{host = Host, auth = Auth, headers = RHeaders} = Requ
|
|||||||
add_to_log(FileSize, Code, Request#request{host = VHost}),
|
add_to_log(FileSize, Code, Request#request{host = VHost}),
|
||||||
{Code, Headers, Contents}
|
{Code, Headers, Contents}
|
||||||
catch _:{Why, _} when Why == noproc; Why == invalid_domain; Why == unregistered_route ->
|
catch _:{Why, _} when Why == noproc; Why == invalid_domain; Why == unregistered_route ->
|
||||||
?ERROR_MSG("Received an HTTP request with Host: ~s, "
|
?DEBUG("Received an HTTP request with Host: ~s, "
|
||||||
"but couldn't find the related "
|
"but couldn't find the related "
|
||||||
"ejabberd virtual host", [Host]),
|
"ejabberd virtual host", [Host]),
|
||||||
ejabberd_web:error(not_found)
|
?HTTP_ERR_FILE_NOT_FOUND
|
||||||
end.
|
end.
|
||||||
|
|
||||||
serve(LocalPath, Auth, DocRoot, DirectoryIndices, CustomHeaders, DefaultContentType,
|
serve(LocalPath, Auth, DocRoot, DirectoryIndices, CustomHeaders, DefaultContentType,
|
||||||
|
Loading…
Reference in New Issue
Block a user