Created
March 8, 2021 13:52
-
-
Save arielshaqed/6b33d03b4f8e1883c69cb16955210598 to your computer and use it in GitHub Desktop.
redirects take headers with them :-(
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ariels@redqueen:~/dev/Tests/manualweb$ http -v --follow get localhost:8888/redirect/foo authorization:yes-i-can | |
GET /redirect/foo HTTP/1.1 | |
Accept: */* | |
Accept-Encoding: gzip, deflate | |
Connection: keep-alive | |
Host: localhost:8888 | |
User-Agent: HTTPie/2.2.0 | |
authorization: yes-i-can | |
HTTP/1.1 307 Temporary Redirect | |
Content-Length: 29 | |
Content-Type: text/plain; charset=utf-8 | |
Date: Mon, 08 Mar 2021 13:50:47 GMT | |
Location: /ok/foo | |
please go to /ok/foo, instead | |
GET /ok/foo HTTP/1.1 | |
Accept: */* | |
Accept-Encoding: gzip, deflate | |
Connection: keep-alive | |
Host: localhost:8888 | |
User-Agent: HTTPie/2.2.0 | |
authorization: yes-i-can | |
HTTP/1.1 200 OK | |
Content-Length: 11 | |
Content-Type: text/plain; charset=utf-8 | |
Date: Mon, 08 Mar 2021 13:50:47 GMT | |
ok: /ok/foo | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
But... sane clients don't copy Authorization over to the redirect, if on a different domain. Again with httpie: