all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: 38713@debbugs.gnu.org
Subject: bug#38713: 27.0.50; eww doesn't handle protocols other than https?
Date: Mon, 23 Dec 2019 01:11:09 +0200	[thread overview]
Message-ID: <87pngggdma.fsf@mail.linkov.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

0. emacs -Q
1. M-x eww RET about:protocols RET hangs with the following line:

Loading http://about:protocols/...

whereas after applying the following patch it displays the nicely
formatted HTML page:

  Supported Protocols - URL vEmacs
   Protocol   Properties   Description
   about   Synchronous  N/A
     Default Port: 0
   ...


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: eww-protocols.patch --]
[-- Type: text/x-diff, Size: 1446 bytes --]

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index dccaf0497f..64386921c7 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -319,7 +319,8 @@ eww--dwim-expand-url
         (t
 	 ;; Anything that starts with something that vaguely looks
 	 ;; like a protocol designator is interpreted as a full URL.
-         (if (or (string-match "\\`[A-Za-z]+:" url)
+         (unless (string-match-p "\\`about:" url)
+         (if (or (string-match-p "\\`[A-Za-z]+:" url)
 		 ;; Also try to match "naked" URLs like
 		 ;; en.wikipedia.org/wiki/Free software
 		 (string-match "\\`[A-Za-z_]+\\.[A-Za-z._]+/" url)
@@ -335,7 +336,7 @@ eww--dwim-expand-url
                  (setq url (concat url "/"))))
            (setq url (concat eww-search-prefix
                              (mapconcat
-                              #'url-hexify-string (split-string url) "+"))))))
+                              #'url-hexify-string (split-string url) "+")))))))
   url)
 
 (defun eww--preprocess-html (start end)
diff --git a/lisp/url/url-about.el b/lisp/url/url-about.el
index e9d9d6346e..ee79ee1aab 100644
--- a/lisp/url/url-about.el
+++ b/lisp/url/url-about.el
@@ -91,7 +95,7 @@ url-about
     (if (fboundp func)
 	(progn
 	  (set-buffer (generate-new-buffer " *about-data*"))
-	  (insert "Content-type: text/plain\n\n")
+	  (insert "Content-type: text/html\n\n")
 	  (funcall func url)
 	  (current-buffer))
       (error "URL does not know about `%s'" item))))

             reply	other threads:[~2019-12-22 23:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-22 23:11 Juri Linkov [this message]
2019-12-22 23:26 ` bug#38713: 27.0.50; eww doesn't handle protocols other than https? Lars Ingebrigtsen
2019-12-23 23:12   ` Juri Linkov
2019-12-24  1:31     ` Lars Ingebrigtsen
2020-01-22 16:15       ` Lars Ingebrigtsen
2019-12-24 15:28     ` Eli Zaretskii
2019-12-25  0:36       ` Using eww as browser for Emacs internals and documentation (was: bug#38713: 27.0.50; eww doesn't handle protocols other than https?) Juri Linkov
2019-12-25 21:43         ` Using eww as browser for Emacs internals and documentation Lars Ingebrigtsen
2019-12-25 21:59           ` Juri Linkov
2020-01-08 16:43           ` T.V Raman
2019-12-25 22:22         ` Stefan Monnier
2019-12-25 23:07           ` Lars Ingebrigtsen
2020-01-08 16:44           ` T.V Raman

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pngggdma.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=38713@debbugs.gnu.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.