>From b183f74911508df20c2aee843490da05f4535a59 Mon Sep 17 00:00:00 2001 From: Ivan Kanis Date: Mon, 24 Jun 2013 10:14:21 +0200 Subject: [PATCH 4/7] tack / at the end of naked url ie: http://google.com -> http://google.com/ --- emacs/gnus/eww.el | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/emacs/gnus/eww.el b/emacs/gnus/eww.el index 50737d5..d34b84a 100644 --- a/emacs/gnus/eww.el +++ b/emacs/gnus/eww.el @@ -109,6 +109,16 @@ It will be used when emacs runs on neither Windows or Mac." (unless (string-match-p "^file:" url) (setq url (concat eww-search-prefix (replace-regexp-in-string " " "+" url))))) + + (and (string-match "https*://\\(.*\\)" url) + ;; true when url part is just a hostname + (not (string-match "/" (substring url (match-beginning 1) + (match-end 1)))) + ;; Last character is not / + (not (string= (substring url (1- (length url)) (length url)) "/")) + ;; tack / at the end of naked url + ;; ie: http://google.com -> http://google.com/ + (setq url ( concat url "/"))) (url-retrieve url 'eww-render (list url))) ;;;###autoload -- 1.7.1