HTTP status for directories
Kay Stein
kaystein92 at gmail.com
Fri Mar 4 12:44:31 UTC 2022
Please remove me.
On Fri, Mar 4, 2022, 5:49 AM Alejandro Colomar (man-pages) <
alx.manpages at gmail.com> wrote:
> On 3/4/22 01:57, Valentin V. Bartenev wrote:> It serves 0 bytes for the
> "301 Moved Permanently", which is ok as any
> > payload for the 301 code isn't displayed in browsers anyway.
> >
> > What do you mean by not showing the 404 page? The "curl" command just
> > doesn't follow the redirect by default. In order to instruct curl to
> > follow redirctions, you need to specify the -L option:
> >
> > curl -L localhost/dir
>
> Ahh, your right, I was missing -L for the redirection.
> It seems that it's working as it should:
>
> user at ADY-debian-11:~$ curl -L --dump-header - localhost/dir
> HTTP/1.1 301 Moved Permanently
> Location: /dir/
> Server: Unit/1.27.0
> Date: Fri, 04 Mar 2022 11:47:10 GMT
> Content-Length: 0
>
> HTTP/1.1 404 Not Found
> Content-Type: text/html
> Server: Unit/1.27.0
> Date: Fri, 04 Mar 2022 11:47:10 GMT
> Content-Length: 54
>
> <!DOCTYPE html><title>Error 404</title><p>Error 404.
>
>
>
> Thanks,
> Alex
>
> --
> Alejandro Colomar
> Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
> http://www.alejandro-colomar.es/
> _______________________________________________
> unit mailing list -- unit at nginx.org
> To unsubscribe send an email to unit-leave at nginx.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/unit/attachments/20220304/ad16cd90/attachment.htm>
More information about the unit
mailing list