summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorstanton <stanton>1999-02-02 22:28:30 (GMT)
committerstanton <stanton>1999-02-02 22:28:30 (GMT)
commitae08beafaca217726da76339786c87bbde65652a (patch)
tree48de648000d708929f6e5c69c604d909443253a4 /library
parente8f0296a2548aa311e6b46b619835532813f4bc0 (diff)
downloadtcl-ae08beafaca217726da76339786c87bbde65652a.zip
tcl-ae08beafaca217726da76339786c87bbde65652a.tar.gz
tcl-ae08beafaca217726da76339786c87bbde65652a.tar.bz2
* library/http2.0/http.tcl: Added catch around eof test in
CopyDone since the user may have already called http::reset. [Bug: 1108]
Diffstat (limited to 'library')
-rw-r--r--library/http/http.tcl5
-rw-r--r--library/http2.0/http.tcl5
-rw-r--r--library/http2.1/http.tcl5
-rw-r--r--library/http2.3/http.tcl5
4 files changed, 12 insertions, 8 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index aa2356b..6ad16df 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.4 1999/01/19 23:30:54 welch Exp $
+# RCS: @(#) $Id: http.tcl,v 1.5 1999/02/02 22:28:30 stanton Exp $
package provide http 2.0 ;# This uses Tcl namespaces
@@ -363,9 +363,10 @@ proc http::size {token} {
if {[info exists state(-progress)]} {
eval $state(-progress) {$token $state(totalsize) $state(currentsize)}
}
+ # At this point the token may have been reset
if {([string length $error] != 0)} {
Finish $token $error
- } elseif {[::eof $s]} {
+ } elseif {[catch {::eof $s} iseof] || $iseof} {
Eof $token
} else {
CopyStart $s $token
diff --git a/library/http2.0/http.tcl b/library/http2.0/http.tcl
index aa2356b..6ad16df 100644
--- a/library/http2.0/http.tcl
+++ b/library/http2.0/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.4 1999/01/19 23:30:54 welch Exp $
+# RCS: @(#) $Id: http.tcl,v 1.5 1999/02/02 22:28:30 stanton Exp $
package provide http 2.0 ;# This uses Tcl namespaces
@@ -363,9 +363,10 @@ proc http::size {token} {
if {[info exists state(-progress)]} {
eval $state(-progress) {$token $state(totalsize) $state(currentsize)}
}
+ # At this point the token may have been reset
if {([string length $error] != 0)} {
Finish $token $error
- } elseif {[::eof $s]} {
+ } elseif {[catch {::eof $s} iseof] || $iseof} {
Eof $token
} else {
CopyStart $s $token
diff --git a/library/http2.1/http.tcl b/library/http2.1/http.tcl
index aa2356b..6ad16df 100644
--- a/library/http2.1/http.tcl
+++ b/library/http2.1/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.4 1999/01/19 23:30:54 welch Exp $
+# RCS: @(#) $Id: http.tcl,v 1.5 1999/02/02 22:28:30 stanton Exp $
package provide http 2.0 ;# This uses Tcl namespaces
@@ -363,9 +363,10 @@ proc http::size {token} {
if {[info exists state(-progress)]} {
eval $state(-progress) {$token $state(totalsize) $state(currentsize)}
}
+ # At this point the token may have been reset
if {([string length $error] != 0)} {
Finish $token $error
- } elseif {[::eof $s]} {
+ } elseif {[catch {::eof $s} iseof] || $iseof} {
Eof $token
} else {
CopyStart $s $token
diff --git a/library/http2.3/http.tcl b/library/http2.3/http.tcl
index aa2356b..6ad16df 100644
--- a/library/http2.3/http.tcl
+++ b/library/http2.3/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.4 1999/01/19 23:30:54 welch Exp $
+# RCS: @(#) $Id: http.tcl,v 1.5 1999/02/02 22:28:30 stanton Exp $
package provide http 2.0 ;# This uses Tcl namespaces
@@ -363,9 +363,10 @@ proc http::size {token} {
if {[info exists state(-progress)]} {
eval $state(-progress) {$token $state(totalsize) $state(currentsize)}
}
+ # At this point the token may have been reset
if {([string length $error] != 0)} {
Finish $token $error
- } elseif {[::eof $s]} {
+ } elseif {[catch {::eof $s} iseof] || $iseof} {
Eof $token
} else {
CopyStart $s $token