]> granicus.if.org Git - ejabberd/commitdiff
Don't report Host mismatch as an error
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Thu, 5 Oct 2017 08:08:58 +0000 (11:08 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Thu, 5 Oct 2017 08:08:58 +0000 (11:08 +0300)
src/mod_http_fileserver.erl

index b3e75c495c2f99fa91c769273d02202d14dcdb7b..d9805c1a2ecfddcb7d366a81c95aa40ccc2abf91 100644 (file)
@@ -310,10 +310,10 @@ process(LocalPath, #request{host = Host, auth = Auth, headers = RHeaders} = Requ
        add_to_log(FileSize, Code, Request#request{host = VHost}),
        {Code, Headers, Contents}
     catch _:{Why, _} when Why == noproc; Why == invalid_domain; Why == unregistered_route ->
-           ?ERROR_MSG("Received an HTTP request with Host: ~s, "
-                      "but couldn't find the related "
-                      "ejabberd virtual host", [Host]),
-           ejabberd_web:error(not_found)
+           ?DEBUG("Received an HTTP request with Host: ~s, "
+                  "but couldn't find the related "
+                  "ejabberd virtual host", [Host]),
+           ?HTTP_ERR_FILE_NOT_FOUND
     end.
 
 serve(LocalPath, Auth, DocRoot, DirectoryIndices, CustomHeaders, DefaultContentType,