diff options
author | hobbs <hobbs> | 1999-10-21 02:16:37 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 1999-10-21 02:16:37 (GMT) |
commit | 5febb5a71e435b42fe6bf68500c49ee8cfde341b (patch) | |
tree | 1c188b7a138f82c2f49159eb94027b4be08ddfd5 /library/http2.1/http.tcl | |
parent | 255b6f78419e20a2954baaab97b26182a4b27c76 (diff) | |
download | tcl-5febb5a71e435b42fe6bf68500c49ee8cfde341b.zip tcl-5febb5a71e435b42fe6bf68500c49ee8cfde341b.tar.gz tcl-5febb5a71e435b42fe6bf68500c49ee8cfde341b.tar.bz2 |
* library/http2.1/http.tcl: protected gets with catch [Bug: 2665]
Diffstat (limited to 'library/http2.1/http.tcl')
-rw-r--r-- | library/http2.1/http.tcl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/library/http2.1/http.tcl b/library/http2.1/http.tcl index c4da3d7..91a997b 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.11 1999/10/05 22:46:00 hobbs Exp $ +# RCS: @(#) $Id: http.tcl,v 1.12 1999/10/21 02:16:37 hobbs Exp $ package provide http 2.1 ;# This uses Tcl namespaces @@ -349,7 +349,9 @@ proc http::cleanup {token} { return } if {[string equal $state(state) "header"]} { - set n [gets $s line] + if {[catch {gets $s line} n]} { + Finish $token $err + } if {$n == 0} { set state(state) body if {![regexp -nocase ^text $state(type)]} { |