for http uris with empty hosts, omit the scheme in the string repr

This commit is contained in:
Alex Shinn 2015-02-11 20:27:27 +09:00
parent 57e657a48d
commit 695b845b11

View file

@ -184,7 +184,9 @@
(host (uri-host uri))
(user (uri-user uri)))
(string-append
(symbol->string (uri-scheme uri)) ":"
(if (and (not host) (memq (uri-scheme uri) '(http https)))
""
(string-append (symbol->string (uri-scheme uri)) ":"))
(if (or user host port) "//" "")
(if user (encode user) "") (if user "@" "")
(or host "") ; host shouldn't need encoding