[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: httP vs http



In [emacs-w3m : No.11839] jidanni@xxxxxxxxxxx wrote:
> Now browse httP://jidanni.org/
> Put the cursor on top of the link "ENGLISH ONLY", and hit "=".
> You will see:
[...]
> Current Anchor: httP://jidanni.orgindex_en.html
>                                  ^^^Notice how the "/" is gone!?

Thanks for pointing it out.  I've fixed this bug in CVS.
Here is a diff:
--- w3m.el~	2012-06-03 23:29:14.000000000 +0000
+++ w3m.el	2012-06-04 04:49:01.975260600 +0000
@@ -6713,7 +6713,8 @@
 	      (w3m-string-match-url-components base)
 	      (match-beginning 1))
 	    (and (not (match-beginning 3))
-		 (member (match-string 2 base) w3m-url-hierarchical-schemes)
+		 (member (downcase (match-string 2 base))
+			 w3m-url-hierarchical-schemes)
 		 (setq base (concat
 			     (substring base 0 (match-end 1))
 			     "//"
@@ -6749,7 +6750,7 @@
 	  ;; part. => URL has an absolute spec.
 	  url
 	(let ((scheme (match-string 2 url)))
-	  (if (and (member scheme w3m-url-hierarchical-schemes)
+	  (if (and (member (downcase scheme) w3m-url-hierarchical-schemes)
 		   (progn
 		     (w3m-string-match-url-components base)
 		     (equal scheme (match-string 2 base))))
@@ -6770,7 +6771,9 @@
 	  (w3m-string-match-url-components base)
 	  (concat
 	   (substring base 0 (match-beginning 5))
-	   (if (member (match-string 2 base) w3m-url-hierarchical-schemes)
+	   (if (and (match-beginning 2)
+		    (member (downcase (match-string 2 base))
+			    w3m-url-hierarchical-schemes))
 	       (w3m-expand-path-name
 		(substring url 0 path-end)
 		(or