HTTP status for directories
Alejandro Colomar (man-pages)
alx.manpages at gmail.com
Fri Mar 4 00:41:28 UTC 2022
As I finished the implementation of "index" supporting an empty array, I
did some deep testing, and got something interesting. It works as
expected, but there's still something that may not be what we want.
When a dir is requested, the behavior is different right now for the
following two cases:
user at ADY-debian-11:~/src/nginx/unit$ curl --dump-header - localhost/dir
HTTP/1.1 301 Moved Permanently
Date: Thu, 03 Mar 2022 23:58:58 GMT
user at ADY-debian-11:~/src/nginx/unit$ curl --dump-header - localhost/dir/
HTTP/1.1 404 Not Found
Date: Thu, 03 Mar 2022 23:59:01 GMT
<!DOCTYPE html><title>Error 404</title><p>Error 404.
The redirect makes sense, but we're not showing the 404 page after the
redirection. It serves 0 bytes. Is that correct?
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
More information about the unit