[erlang-questions] inets mod_get mishandles inaccessible files

Paul Fisher <>
Fri May 9 05:25:33 CEST 2008

When the inets httpd mod_get processes a request for a non-existent file
the connection is closed without a response.  I would expect it to
return a 404 instead.  Here is what comes out in the error_log:

[08/May/2008:21:47:08 -0500], traverse exit from apply: mod_get:do => 

Apparently mod_get:do_get/1 (and associated functions) is not prepared
to get {error, enoent} back from mod_alias:path/3, and there seems to be
no provision for generating a 404 response in do_get.  It also looks
like files/directories with invalid permissions within the document_root
would also generate the same issue.

In the end it appears that a non-trivial patch would be required to
handle all of the cases and return appropriate responses in all cases.
Would such a patch be acceptable for integration into a future OTP

This is with R12B-2.


More information about the erlang-questions mailing list