]> git.eshelyaron.com Git - emacs.git/commit
url-http: Fix handling of redirect locations
authorDaniele Nicolodi <daniele@grinta.net>
Sun, 19 Jul 2020 19:16:55 +0000 (21:16 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 19 Jul 2020 19:16:55 +0000 (21:16 +0200)
commit5d2a83ea0e79308f85d06553483001b7cb2e3a14
treebe18318c697ffbe106507dd9a63764a217b0e54e
parentf8f3e77fa83a3a97e5a0de8a7c75092cadf82627
url-http: Fix handling of redirect locations

* lisp/url/url-http.el (url-http-parse-headers): Parse redirect
URIs more like other web browsers (bug#42382).

RFC 7231 the Location header is defined to carry a URI-reference.
According to RFC 3986 it should be percent-encoded and thus should not
contain spaces. However, there are HTTP server implementation (notably
nginx) that do not do that. This makes Emacs url-http.el behave like
most other HTTP client implementatios. Also remove the stripping of
angle bracket quotes as they are not valid according to the RFCs.

Copyright-paperwork-exempt: yes
lisp/url/url-http.el