url-http.el interprets HTTP responses in url-http-parse-headers. This function contains the following code: (when redirect-uri ;; Clean off any whitespace and/or <...> cruft. (if (string-match "\\([^ \t]+\\)[ \t]" redirect-uri) (setq redirect-uri (match-string 1 redirect-uri))) (if (string-match "^<\\(.*\\)>$" redirect-uri) (setq redirect-uri (match-string 1 redirect-uri))) which truncates the value of the Location header at the first whitespace character and removes surrounding angle brackets quoting. In 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. While this is a bug in those HTTP server implementations, I think Emacs should follow what most other HTTP client implementatios (all the ones I tested) and use the content of the Location header unmodified. Stripping of angle bracket quotes is unnecessary as they are not valid according to the RFCs. Also, accordingly to the RFCs, the location header may contain a relative location. Thus the comment that suggest that such a response is a bug in the server should be reworded. The attached patches implement the proposed changes. Thank you.