diff lisp/w3/url-parse.el @ 86:364816949b59 r20-0b93

Import from CVS: tag r20-0b93
author cvs
date Mon, 13 Aug 2007 09:09:02 +0200
parents 6a378aca36af
children
line wrap: on
line diff
--- a/lisp/w3/url-parse.el	Mon Aug 13 09:08:31 2007 +0200
+++ b/lisp/w3/url-parse.el	Mon Aug 13 09:09:02 2007 +0200
@@ -1,7 +1,7 @@
 ;;; url-parse.el --- Uniform Resource Locator parser
 ;; Author: wmperry
-;; Created: 1997/01/10 00:13:05
-;; Version: 1.4
+;; Created: 1997/01/23 16:48:58
+;; Version: 1.6
 ;; Keywords: comm, data, processes
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -108,7 +108,8 @@
 
 (defun url-generic-parse-url (url)
   "Return a vector of the parts of URL.
-Format is [protocol username password hostname portnumber file reference]"
+Format is:
+[proto username password hostname portnumber file reference attributes fullp]"
   (cond
    ((null url)
     (make-vector 9 nil))
@@ -152,7 +153,6 @@
 	      (forward-char 2)
 	      (setq save-pos (point))
 	      (skip-chars-forward "^/")
-	      (downcase-region save-pos (point))
 	      (setq host (buffer-substring save-pos (point)))
 	      (if (string-match "^\\([^@]+\\)@" host)
 		  (setq user (url-match host 1)
@@ -165,7 +165,8 @@
 			host (substring host 0 (match-beginning 0))))
 	      (if (string-match ":$" host)
 		  (setq host (substring host 0 (match-beginning 0))))
-	      (setq save-pos (point))))
+	      (setq host (downcase host)
+		    save-pos (point))))
 	;; Now check for references
 	(setq save-pos (point))
 	(skip-chars-forward "^#")