summaryrefslogtreecommitdiffstats
path: root/library/http
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2008-02-22 10:56:38 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2008-02-22 10:56:38 (GMT)
commit9c4dbb88d7e4bb7dcffb0116a219bd6d09c28673 (patch)
tree8e659f069abb4304b0e921b22c7a027b97e6291a /library/http
parent7ef524d53becde0248b676f1849e769fc0a9c4eb (diff)
downloadtcl-9c4dbb88d7e4bb7dcffb0116a219bd6d09c28673.zip
tcl-9c4dbb88d7e4bb7dcffb0116a219bd6d09c28673.tar.gz
tcl-9c4dbb88d7e4bb7dcffb0116a219bd6d09c28673.tar.bz2
Fix for bug #1818565. Always check that the state array exists in the http::status command. Set version 2.5.4
Diffstat (limited to 'library/http')
-rw-r--r--library/http/http.tcl8
-rw-r--r--library/http/pkgIndex.tcl2
2 files changed, 5 insertions, 5 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index f307a20..2888def 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -8,7 +8,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.60 2007/03/12 22:08:40 patthoyts Exp $
+# RCS: @(#) $Id: http.tcl,v 1.61 2008/02/22 10:56:40 patthoyts Exp $
# Rough version history:
# 1.0 Old http_get interface.
@@ -24,7 +24,7 @@
package require Tcl 8.4
# Keep this in sync with pkgIndex.tcl and with the install directories
# in Makefiles
-package provide http 2.5.3
+package provide http 2.5.4
namespace eval http {
variable http
@@ -632,7 +632,7 @@ proc http::data {token} {
return $state(body)
}
proc http::status {token} {
- variable $token
+ if {![info exists $token]} { return "error" }
upvar 0 $token state
return $state(status)
}
@@ -957,7 +957,7 @@ proc http::wait {token} {
vwait $token\(status)
}
- return $state(status)
+ return [status $token]
}
# http::formatQuery --
diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl
index af88a2e..eaf0c86 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.4]} {return}
-package ifneeded http 2.5.3 [list tclPkgSetup $dir http 2.5.3 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
+package ifneeded http 2.5.4 [list tclPkgSetup $dir http 2.5.4 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]