From 0cbb9c47d7cd5a71ca1189ab216bf3ded3800278 Mon Sep 17 00:00:00 2001 From: hobbs Date: Sat, 4 Dec 1999 06:16:00 +0000 Subject: * library/http2.1/http.tcl: fixed error handling in http::Event [Bug: 3752] --- library/http/http.tcl | 7 +++---- library/http2.1/http.tcl | 7 +++---- library/http2.3/http.tcl | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/library/http/http.tcl b/library/http/http.tcl index b0af22f..07d8e87 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.18 1999/11/19 23:10:08 hobbs Exp $ +# RCS: @(#) $Id: http.tcl,v 1.19 1999/12/04 06:16:00 hobbs Exp $ package provide http 2.2 ;# This uses Tcl namespaces @@ -448,9 +448,8 @@ proc http::cleanup {token} { } if {[string equal $state(state) "header"]} { if {[catch {gets $s line} n]} { - Finish $token $err - } - if {$n == 0} { + Finish $token $n + } elseif {$n == 0} { set state(state) body if {![regexp -nocase ^text $state(type)]} { # Turn off conversions for non-text data diff --git a/library/http2.1/http.tcl b/library/http2.1/http.tcl index b0af22f..07d8e87 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.18 1999/11/19 23:10:08 hobbs Exp $ +# RCS: @(#) $Id: http.tcl,v 1.19 1999/12/04 06:16:00 hobbs Exp $ package provide http 2.2 ;# This uses Tcl namespaces @@ -448,9 +448,8 @@ proc http::cleanup {token} { } if {[string equal $state(state) "header"]} { if {[catch {gets $s line} n]} { - Finish $token $err - } - if {$n == 0} { + Finish $token $n + } elseif {$n == 0} { set state(state) body if {![regexp -nocase ^text $state(type)]} { # Turn off conversions for non-text data diff --git a/library/http2.3/http.tcl b/library/http2.3/http.tcl index b0af22f..07d8e87 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.18 1999/11/19 23:10:08 hobbs Exp $ +# RCS: @(#) $Id: http.tcl,v 1.19 1999/12/04 06:16:00 hobbs Exp $ package provide http 2.2 ;# This uses Tcl namespaces @@ -448,9 +448,8 @@ proc http::cleanup {token} { } if {[string equal $state(state) "header"]} { if {[catch {gets $s line} n]} { - Finish $token $err - } - if {$n == 0} { + Finish $token $n + } elseif {$n == 0} { set state(state) body if {![regexp -nocase ^text $state(type)]} { # Turn off conversions for non-text data -- cgit v0.12