<div dir="auto">Please remove me.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 4, 2022, 5:49 AM Alejandro Colomar (man-pages) <<a href="mailto:alx.manpages@gmail.com">alx.manpages@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 3/4/22 01:57, Valentin V. Bartenev wrote:> It serves 0 bytes for the<br>
"301 Moved Permanently", which is ok as any<br>
> payload for the 301 code isn't displayed in browsers anyway.<br>
> <br>
> What do you mean by not showing the 404 page? The "curl" command just<br>
> doesn't follow the redirect by default. In order to instruct curl to<br>
> follow redirctions, you need to specify the -L option:<br>
> <br>
> curl -L localhost/dir<br>
<br>
Ahh, your right, I was missing -L for the redirection.<br>
It seems that it's working as it should:<br>
<br>
user@ADY-debian-11:~$ curl -L --dump-header - localhost/dir<br>
HTTP/1.1 301 Moved Permanently<br>
Location: /dir/<br>
Server: Unit/1.27.0<br>
Date: Fri, 04 Mar 2022 11:47:10 GMT<br>
Content-Length: 0<br>
<br>
HTTP/1.1 404 Not Found<br>
Content-Type: text/html<br>
Server: Unit/1.27.0<br>
Date: Fri, 04 Mar 2022 11:47:10 GMT<br>
Content-Length: 54<br>
<br>
<!DOCTYPE html><title>Error 404</title><p>Error 404.<br>
<br>
<br>
<br>
Thanks,<br>
Alex<br>
<br>
-- <br>
Alejandro Colomar<br>
Linux man-pages comaintainer; <a href="https://www.kernel.org/doc/man-pages/" rel="noreferrer noreferrer" target="_blank">https://www.kernel.org/doc/man-pages/</a><br>
<a href="http://www.alejandro-colomar.es/" rel="noreferrer noreferrer" target="_blank">http://www.alejandro-colomar.es/</a><br>
_______________________________________________<br>
unit mailing list -- <a href="mailto:unit@nginx.org" target="_blank" rel="noreferrer">unit@nginx.org</a><br>
To unsubscribe send an email to <a href="mailto:unit-leave@nginx.org" target="_blank" rel="noreferrer">unit-leave@nginx.org</a><br>
</blockquote></div>