diff options
Diffstat (limited to 'contrib/tcl/library/http2.0/http.tcl')
-rw-r--r-- | contrib/tcl/library/http2.0/http.tcl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/tcl/library/http2.0/http.tcl b/contrib/tcl/library/http2.0/http.tcl index 80fbfc672412..79c83c3885b3 100644 --- a/contrib/tcl/library/http2.0/http.tcl +++ b/contrib/tcl/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. # -# SCCS: @(#) http.tcl 1.6 97/08/07 16:48:32 +# SCCS: @(#) http.tcl 1.8 97/10/28 16:23:30 package provide http 2.0 ;# This uses Tcl namespaces @@ -352,7 +352,7 @@ proc http::size {token} { Finish $token $err } } - proc http::CopyDone {token count} { + proc http::CopyDone {token count {error {}}} { variable $token upvar 0 $token state set s $state(sock) @@ -360,7 +360,9 @@ proc http::size {token} { if [info exists state(-progress)] { eval $state(-progress) {$token $state(totalsize) $state(currentsize)} } - if [::eof $s] { + if {([string length $error] != 0)} { + Finish $token $error + } elseif {[::eof $s]} { Eof $token } else { CopyStart $s $token |