From 4d03cb8c75ad0b1956f84f457107fcb4da602926 Mon Sep 17 00:00:00 2001
From: Slava Pestov <slava@slava-pestovs-macbook-pro.local>
Date: Tue, 29 Apr 2008 21:08:57 -0500
Subject: [PATCH] Workaround to make http.client work with old http.server

---
 extra/http/http.factor | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/extra/http/http.factor b/extra/http/http.factor
index 3402b42ca7..9729542ea4 100755
--- a/extra/http/http.factor
+++ b/extra/http/http.factor
@@ -329,7 +329,8 @@ SYMBOL: max-post-request
     [ host>> ] [ port>> ] bi <inet> ;
 
 : request-host ( request -- string )
-    [ host>> ] [ drop ":" ] [ port>> number>string ] tri 3append ;
+    [ host>> ] [ port>> ] bi
+    dup 80 = [ drop ] [ ":" swap number>string 3append ] if ;
 
 : write-request-header ( request -- request )
     dup header>> >hashtable