diff options
author | hobbs <hobbs> | 2002-01-25 03:07:15 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-01-25 03:07:15 (GMT) |
commit | 012a69519a5ac4295eb597527e3f465fac7358a3 (patch) | |
tree | 1f7fcb4882ecc0a7e10dbf263b101c352fee5bc8 | |
parent | a6b8152740ffe25d2be6a130a03abbedf558538b (diff) | |
download | tcl-012a69519a5ac4295eb597527e3f465fac7358a3.zip tcl-012a69519a5ac4295eb597527e3f465fac7358a3.tar.gz tcl-012a69519a5ac4295eb597527e3f465fac7358a3.tar.bz2 |
* library/http/pkgIndex.tcl:
* library/http/http.tcl: don't add port in default case to handle
broken servers. http bumped to 2.4.1 [Bug #504508]
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | library/http/http.tcl | 12 | ||||
-rw-r--r-- | library/http/pkgIndex.tcl | 2 |
3 files changed, 16 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2002-01-24 Jeff Hobbs <jeffh@ActiveState.com> + + * library/http/pkgIndex.tcl: + * library/http/http.tcl: don't add port in default case to handle + broken servers. http bumped to 2.4.1 [Bug #504508] + 2002-01-23 Andreas Kupries <andreas_kupries@users.sourceforge.net> * unix/mkLinks: Regenerated. diff --git a/library/http/http.tcl b/library/http/http.tcl index fd0ed5a..838ae1b 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: http.tcl,v 1.39 2001/09/07 02:43:12 dgp Exp $ +# RCS: @(#) $Id: http.tcl,v 1.40 2002/01/25 03:07:16 hobbs Exp $ # Rough version history: # 1.0 Old http_get interface @@ -24,7 +24,7 @@ package require Tcl 8.2 # keep this in sync with pkgIndex.tcl -package provide http 2.4 +package provide http 2.4.1 namespace eval http { variable http @@ -404,7 +404,13 @@ proc http::geturl { url args } { if {[catch { puts $s "$how $srvurl HTTP/1.0" puts $s "Accept: $http(-accept)" - puts $s "Host: $host:$port" + 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 diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index b7b87a9..bfca5a9 100644 --- a/library/http/pkgIndex.tcl +++ b/library/http/pkgIndex.tcl @@ -9,4 +9,4 @@ # full path name of this file's directory. if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded http 2.4 [list tclPkgSetup $dir http 2.4 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister}}}] +package ifneeded http 2.4.1 [list tclPkgSetup $dir http 2.4.1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister}}}] |