summaryrefslogtreecommitdiffstats
path: root/library/http
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-11-13 18:02:35 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-11-13 18:02:35 (GMT)
commita1db4012d910de13424097d808dfa19402ef4125 (patch)
tree5301a22c49b0eae2d3979522dc752f89c89ab5d6 /library/http
parent3f0cb9473b5d88d6f013bd1442806718bb5fe990 (diff)
parent1f0fc6d0b1ae5f42156cd2187ad73acf2218680a (diff)
downloadtcl-a1db4012d910de13424097d808dfa19402ef4125.zip
tcl-a1db4012d910de13424097d808dfa19402ef4125.tar.gz
tcl-a1db4012d910de13424097d808dfa19402ef4125.tar.bz2
merge trunk
Diffstat (limited to 'library/http')
-rw-r--r--library/http/http.tcl16
-rw-r--r--library/http/pkgIndex.tcl2
2 files changed, 8 insertions, 10 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index 98ed71b..b8ab0d0 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -11,7 +11,7 @@
package require Tcl 8.6
# Keep this in sync with pkgIndex.tcl and with the install directories in
# Makefiles
-package provide http 2.8.4
+package provide http 2.8.5
namespace eval http {
# Allow resourcing to not clobber existing data
@@ -209,15 +209,13 @@ proc http::Finish {token {errormsg ""} {skipCB 0}} {
if {[info exists state(after)]} {
after cancel $state(after)
}
- if {[info exists state(-command)] && !$skipCB} {
- if {[catch {eval $state(-command) {$token}} err]} {
- if {$errormsg eq ""} {
- set state(error) [list $err $errorInfo $errorCode]
- set state(status) error
- }
+ if {[info exists state(-command)] && !$skipCB
+ && ![info exists state(done-command-cb)]} {
+ set state(done-command-cb) yes
+ if {[catch {eval $state(-command) {$token}} err] && $errormsg eq ""} {
+ set state(error) [list $err $errorInfo $errorCode]
+ set state(status) error
}
- # Command callback may already have unset our state
- unset -nocomplain state(-command)
}
}
diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl
index d20ed41..1211a34 100644
--- a/library/http/pkgIndex.tcl
+++ b/library/http/pkgIndex.tcl
@@ -1,4 +1,4 @@
if {![package vsatisfies [package provide Tcl] 8.6]} {return}
-package ifneeded http 2.8.4 [list tclPkgSetup $dir http 2.8.4 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
+package ifneeded http 2.8.5 [list tclPkgSetup $dir http 2.8.5 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
package ifneeded cookiejar 0.1 [list source [file join $dir cookiejar.tcl]]
package ifndeeded tcl::idna 1.0 [list source [file join $dir idna.tcl]]