url-port can be #f when no port is specified

svn: r3802

original commit: d5294823a2160c9cf99db2e0f6481e29f741784a
This commit is contained in:
Eli Barzilay 2006-07-25 06:49:41 +00:00
parent f1ab9853dc
commit 66f06dd4f6

View File

@ -126,9 +126,7 @@
(display "\r\n" client->server))
(println (if get? "GET " "POST ") access-string " HTTP/1.0")
(println "Host: " (url-host url)
(let ([p (url-port url)])
(if (equal? p (url->default-port url))
"" (format ":~a" p))))
(let ([p (url-port url)]) (if p (format ":~a" p) "")))
(when post-data (println "Content-Length: " (bytes-length post-data)))
(for-each println strings)
(println)