Small bug-fixes in URL printing and parsing.

This commit is contained in:
1999-08-07 17:33:23 +00:00
parent 88cdc8f6c8
commit 0a25f68f43

View File

@ -154,7 +154,7 @@ don't provide a scheme by themselves.")
(url-searchpart url)))
(defmethod url-significant-string ((url url-http))
(format nil "~:[~;//~A~@[:~A~]/~]~@[~A~]"
(format nil "~:[~2*~;//~A~@[:~A~]/~]~@[~A~]"
(or (url-host url) (url-port url))
(url-host url)
(url-port url)
@ -164,7 +164,7 @@ don't provide a scheme by themselves.")
(declare (ignore scheme))
(let ((rest (subseq url start))
host port path searchpart)
(when (equal "//" (subseq rest 0 2))
(when (and (> (length rest) 1) (equal "//" (subseq rest 0 2)))
(let* ((rest-pos (position +url-path-separator+ rest :start 2))
(port-pos (position +url-host-port-separator+ rest :start 2
:end rest-pos)))