Tcl Source Code

Artifact [a657084b36]
Login

Artifact a657084b368dbf8b4d44748c15fea4ba4e1458d2:

Attachment "http-port80.txt" to ticket [504508ffff] added by hobbs 2002-01-25 10:01:08.
Index: library/http/http.tcl
===================================================================
RCS file: /cvsroot/tcl/tcl/library/http/http.tcl,v
retrieving revision 1.39
diff -b -u -r1.39 http.tcl
--- library/http/http.tcl	2001/09/07 02:43:12	1.39
+++ library/http/http.tcl	2002/01/25 02:59:58
@@ -404,7 +404,13 @@
     if {[catch {
 	puts $s "$how $srvurl HTTP/1.0"
 	puts $s "Accept: $http(-accept)"
+	if {$port == $defport} {
+	    # Don't add port in this case, to handle broken servers.
+	    # [Bug #504508]
+	    puts $s "Host: $host"
+	} else {
 	puts $s "Host: $host:$port"
+	}
 	puts $s "User-Agent: $http(-useragent)"
 	foreach {key value} $state(-headers) {
 	    regsub -all \[\n\r\]  $value {} value