diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-08-04 11:09:40 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-08-04 11:09:40 +0200 |
commit | 8348ace63a9c2cd039cad855784e2c352c3bb789 (patch) | |
tree | 3aad2024fdbedc5d72e10fa4ec97ab0227b72e37 /lisp/url | |
parent | 3ec2fdc9a1c2162242c30788a932427198c27de2 (diff) | |
download | emacs-8348ace63a9c2cd039cad855784e2c352c3bb789.tar.gz |
Revert "Fix about:protocols in EWW"
This reverts commit b49c1740105dd3715315aa433674c95f44aaeac4.
We're making this obsolete instead.
Diffstat (limited to 'lisp/url')
-rw-r--r-- | lisp/url/url-about.el | 2 | ||||
-rw-r--r-- | lisp/url/url-http.el | 48 |
2 files changed, 23 insertions, 27 deletions
diff --git a/lisp/url/url-about.el b/lisp/url/url-about.el index ee94fde8b4c..a50986d511a 100644 --- a/lisp/url/url-about.el +++ b/lisp/url/url-about.el @@ -93,7 +93,7 @@ (if (fboundp func) (progn (set-buffer (generate-new-buffer " *about-data*")) - (insert "Content-type: text/html\n\n") + (insert "Content-type: text/plain\n\n") (funcall func url) (current-buffer)) (error "URL does not know about `%s'" item)))) diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index e2d28974b66..125f8436f68 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -237,32 +237,28 @@ request.") (if (not (url-p url-current-lastloc)) (setq url-current-lastloc (url-generic-parse-url url-current-lastloc))) (let ((referer (copy-sequence url-current-lastloc))) - ;; In the case of `url-about', there is actually no host. - (if (url-host referer) - (progn - (setf (url-host referer) (puny-encode-domain (url-host referer))) - (let ((referer-string (url-recreate-url referer))) - (when (and (not (memq url-privacy-level '(low high paranoid))) - (not (and (listp url-privacy-level) - (memq 'lastloc url-privacy-level)))) - ;; url-privacy-level allows referer. But url-lastloc-privacy-level - ;; may restrict who we send it to. - (cl-case url-lastloc-privacy-level - (host-match - (let ((referer-host (url-host referer)) - (url-host (url-host url))) - (when (string= referer-host url-host) - referer-string))) - (domain-match - (let ((referer-domain (url-domain referer)) - (url-domain (url-domain url))) - (when (and referer-domain - url-domain - (string= referer-domain url-domain)) - referer-string))) - (otherwise - referer-string))))) - nil)))) + (setf (url-host referer) (puny-encode-domain (url-host referer))) + (let ((referer-string (url-recreate-url referer))) + (when (and (not (memq url-privacy-level '(low high paranoid))) + (not (and (listp url-privacy-level) + (memq 'lastloc url-privacy-level)))) + ;; url-privacy-level allows referer. But url-lastloc-privacy-level + ;; may restrict who we send it to. + (cl-case url-lastloc-privacy-level + (host-match + (let ((referer-host (url-host referer)) + (url-host (url-host url))) + (when (string= referer-host url-host) + referer-string))) + (domain-match + (let ((referer-domain (url-domain referer)) + (url-domain (url-domain url))) + (when (and referer-domain + url-domain + (string= referer-domain url-domain)) + referer-string))) + (otherwise + referer-string))))))) ;; Building an HTTP request (defun url-http-user-agent-string () |