From: Lars Ingebrigtsen <larsi@gnus.org>
To: Romain Ouabdelkader <romain.ouabdelkader@gmail.com>
Cc: 37187@debbugs.gnu.org, Thomas Fitzsimmons <fitzsim@fitzsim.org>
Subject: bug#37187: 26.2; url-retrieve redirect lost Authorization headers
Date: Fri, 20 Sep 2019 22:36:18 +0200 [thread overview]
Message-ID: <877e627lj1.fsf@gnus.org> (raw)
In-Reply-To: <CAJ8YToZhdbiRPrpBT=MeTZO6Eu2v5+mFL3Z10T6E7Er5bdn=rQ@mail.gmail.com> (Romain Ouabdelkader's message of "Mon, 26 Aug 2019 00:08:35 +0200")
Romain Ouabdelkader <romain.ouabdelkader@gmail.com> writes:
> I have an issue with the 'url-retrieve' function:
> If the target url returns a redirect, the 'Authorization' header is not
> sent on the redirect url.
This is apparently on purpose:
;; Do not automatically include an authorization header in the
;; redirect. If needed it will be regenerated by the relevant
;; auth scheme when the new request happens.
(setq url-http-extra-headers
(cl-remove "Authorization"
url-http-extra-headers :key 'car :test 'equal))
It's from this patch:
commit 325200ac1dcf5bed6918ea827d8a48d89487e083
Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Date: Wed Sep 23 01:45:29 2015 -0400
Do not include authorization header in an HTTP redirect
* lisp/url/url-http.el (url-http-parse-headers): Do not
automatically include Authorization header in redirect.
(Bug#21350)
And I think that makes sense -- when there's a redirect, the domain may
be new, and the auth should perhaps not be sent there.
I've had a look at the standards, but I can't see that they say anything
about this, so I think that perhaps this works as it's supposed to. But
I haven't checked what Firefox does, for instance.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2019-09-20 20:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-25 22:08 bug#37187: 26.2; url-retrieve redirect lost Authorization headers Romain Ouabdelkader
2019-09-20 20:36 ` Lars Ingebrigtsen [this message]
2019-09-21 0:01 ` Romain Ouabdelkader
2019-09-21 7:41 ` Lars Ingebrigtsen
2019-09-21 8:26 ` Romain Ouabdelkader
2019-09-21 8:40 ` Lars Ingebrigtsen
2019-09-21 9:27 ` Romain Ouabdelkader
2020-07-19 20:24 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877e627lj1.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=37187@debbugs.gnu.org \
--cc=fitzsim@fitzsim.org \
--cc=romain.ouabdelkader@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).