From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Cc: 21350@debbugs.gnu.org
Subject: bug#21350: 25.0.50; Do not automatically include authorization header in HTTP redirects
Date: Sat, 29 Aug 2015 11:21:35 -0400 [thread overview]
Message-ID: <jwvoahqunse.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <m37foidbb9.fsf@fitzsim.org> (Thomas Fitzsimmons's message of "Tue, 25 Aug 2015 22:37:46 -0400")
> This patch is required for url-http-ntlm.el to handle redirects. I'd
> like someone more familiar with url-http.el to review it.
I'm not sure if there is such a someone, to tell you the truth. I can
give you comments about Elisp style:
+ ;; Don't automatically include authorization header in redirect.
+ ;; If needed it will be regenerated by the relevant auth scheme
+ ;; when the new request happens.
+ (setq url-http-extra-headers
+ (let (result)
+ (dolist (header url-http-extra-headers)
+ (if (not (equal (car header) "Authorization"))
+ (push header result)))
+ (nreverse result)))
IIUC this is like:
(let ((a (assoc "Authorization" url-http-extra-headers)))
(if a (setq url-http-extra-headers (delq a url-http-extra-headers))))
Tho maybe it should be `remq' rather than `delq'.
Stefan
next prev parent reply other threads:[~2015-08-29 15:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 2:37 bug#21350: 25.0.50; Do not automatically include authorization header in HTTP redirects Thomas Fitzsimmons
2015-08-29 15:21 ` Stefan Monnier [this message]
2015-09-01 2:33 ` Thomas Fitzsimmons
2015-09-01 3:58 ` Stefan Monnier
2015-09-07 0:10 ` Thomas Fitzsimmons
2015-09-07 15:23 ` Stefan Monnier
2015-09-23 6:09 ` Thomas Fitzsimmons
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=jwvoahqunse.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=21350@debbugs.gnu.org \
--cc=fitzsim@fitzsim.org \
/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).