From c11196839be2150d8741248e10eda3453af405b4 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 23 Dec 2008 09:02:44 +0000 Subject: [PATCH] minor improvement svn: r12931 --- collects/net/url-unit.ss | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/collects/net/url-unit.ss b/collects/net/url-unit.ss index b7773be917..01855154f4 100644 --- a/collects/net/url-unit.ss +++ b/collects/net/url-unit.ss @@ -378,13 +378,9 @@ (eq? 'windows (file-url-path-convention-type)) (not (equal? host "")))]) (when win-file? - (if (equal? "" port) - (set! path (string-append host ":" path)) - (set! path (if path - (if host - (string-append host "/" path) - path) - host))) + (set! path (cond [(equal? "" port) (string-append host ":" path)] + [(and path host) (string-append host "/" path)] + [else (or path host)])) (set! port #f) (set! host "")) (let* ([scheme (and scheme (string-downcase scheme))]