diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-10-05 11:16:05 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-10-05 11:16:05 +0300 |
commit | 94de13981b578a3c5b2e6c0fdfacda7879560678 (patch) | |
tree | 0b5bc574d080ab5f3a17b20f2d4fa1a1d3917c98 /src/mod_http_fileserver.erl | |
parent | Don't report Host mismatch as an error (diff) |
Log request in access.log even when Host doesn't match
Diffstat (limited to 'src/mod_http_fileserver.erl')
-rw-r--r-- | src/mod_http_fileserver.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_http_fileserver.erl b/src/mod_http_fileserver.erl index d9805c1a..a3a49eef 100644 --- a/src/mod_http_fileserver.erl +++ b/src/mod_http_fileserver.erl @@ -313,7 +313,9 @@ process(LocalPath, #request{host = Host, auth = Auth, headers = RHeaders} = Requ ?DEBUG("Received an HTTP request with Host: ~s, " "but couldn't find the related " "ejabberd virtual host", [Host]), - ?HTTP_ERR_FILE_NOT_FOUND + {FileSize1, Code1, Headers1, Contents1} = ?HTTP_ERR_FILE_NOT_FOUND, + add_to_log(FileSize1, Code1, Request), + {Code1, Headers1, Contents1} end. serve(LocalPath, Auth, DocRoot, DirectoryIndices, CustomHeaders, DefaultContentType, |