From c67ebc59a77414e7ae761c6b723c2bf49821c829 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 9 Apr 2009 17:01:35 +0000 Subject: * library/http/http.tcl: Handle incomplete lines in the "connecting" state. Thanks to Sergei Golovan. [Bug 26245326] --- ChangeLog | 5 +++++ library/http/http.tcl | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 786610f..e580aca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-09 Don Porter + + * library/http/http.tcl: Handle incomplete lines in the + "connecting" state. Thanks to Sergei Golovan. [Bug 26245326] + 2009-04-08 Andreas Kupries * library/platform/platform.tcl: Extended the darwin sections to diff --git a/library/http/http.tcl b/library/http/http.tcl index a98e145..f40221e 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -8,7 +8,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.73 2009/02/24 14:39:15 dkf Exp $ +# RCS: @(#) $Id: http.tcl,v 1.74 2009/04/09 17:01:38 dgp Exp $ package require Tcl 8.4 # Keep this in sync with pkgIndex.tcl and with the install directories in @@ -962,9 +962,10 @@ proc http::Event {sock token} { return } if {$state(state) eq "connecting"} { - set state(state) "header" if {[catch {gets $sock state(http)} n]} { return [Finish $token $n] + } elseif {$n >= 0} { + set state(state) "header" } } elseif {$state(state) eq "header"} { if {[catch {gets $sock line} n]} { -- cgit v0.12