diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-11-06 21:16:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-11-06 21:16:47 (GMT) |
commit | 3bbffed01d2dbaa523b752cf39da3868869ab30a (patch) | |
tree | c14615d6142b071be9e263cb3a93d4bac98dad89 /library/http/http.tcl | |
parent | 66cb991a8b6edb5c8f424d1aed10e35b8113bd13 (diff) | |
parent | a211779208901e6896f83c8f03817fadfe6b95d0 (diff) | |
download | tcl-3bbffed01d2dbaa523b752cf39da3868869ab30a.zip tcl-3bbffed01d2dbaa523b752cf39da3868869ab30a.tar.gz tcl-3bbffed01d2dbaa523b752cf39da3868869ab30a.tar.bz2 |
merge trunk
Diffstat (limited to 'library/http/http.tcl')
-rw-r--r-- | library/http/http.tcl | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl index 2653c3e..d57e3ce 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 @@ -205,15 +205,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) } } |