Closed josephbu closed 7 months ago
Hi! Thanks the detail report. I think I have fixed all of these issues, could you try some of them again to confirm?
@neurosnap Thank you!
I've checked and most of the examples are fixed, however when redirecting to a complete URL I still get a 404.
Tested with the below redirect settings.
$ cat _redirects
/wow https://jb-test.pgs.sh 301
$ cat _redirects
/wow https://wow.com
Oops, looks like I missed that use case, should be fixed: https://github.com/picosh/pico/commit/de1beb00f2ffcb4896ceb91856437ff2f1e501d2
Can you try one more time? Thanks again!
Looks good, testing this one:
$ cat _redirects
/wow https://wow.com
Just confirming that the expected behavior here is to generate OK as the text with a hyperlink to the redirection URL?
$ curl -v https://jb-test.pgs.sh/wow
> GET /wow HTTP/2
> Host: jb-test.pgs.sh
> user-agent: curl/7.81.0
> accept: */*
< HTTP/2 200
* TLSv1.2 (IN), TLS header, Supplemental data (23):
<a href="https://wow.com">OK</a>.
With a http code included in the redirect file, it redirects fine and doesn't print the example output with hyperlink.
Using an example _redirect file and testing.
If I do a curl against
/wow
I get a 404.If instead I do a curl against
//wow
, with the extra/
I see the redirect happen.Next test is removing the status code, so the _redirect file is just a from and to:
With the status code removed from the file, the entire site will just give http 502 error, regardless of the query, eg.
If I put a status code back, but instead change the destination to a URL or to just
/
, I'll only get a 404.Either of these:
Result in:
Maybe some issues parsing
/
?I'm happy to do more testing if it's needed, due to TZ difference I figured might be easier raising here than IRC.