summaryrefslogtreecommitdiffstats
path: root/library/http/http.tcl
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2012-11-20 12:13:43 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2012-11-20 12:13:43 (GMT)
commit3e55ef9d38f9ad0ce68ab947b51a37b144046100 (patch)
treefb090e3289193ec27321e51dab2e78b60ac9de05 /library/http/http.tcl
parentabcad102a592db423039b297a5885beb9034ad5b (diff)
parent884171d33416e69905bbb16e8734dd1d760ed08a (diff)
downloadtcl-3e55ef9d38f9ad0ce68ab947b51a37b144046100.zip
tcl-3e55ef9d38f9ad0ce68ab947b51a37b144046100.tar.gz
tcl-3e55ef9d38f9ad0ce68ab947b51a37b144046100.tar.bz2
merge dkf-compile-misc-info
Diffstat (limited to 'library/http/http.tcl')
-rw-r--r--library/http/http.tcl16
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)
}
}