summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--library/http/http.tcl5
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 <dgp@users.sourceforge.net>
+
+ * library/http/http.tcl: Handle incomplete lines in the
+ "connecting" state. Thanks to Sergei Golovan. [Bug 26245326]
+
2009-04-08 Andreas Kupries <andreask@activestate.com>
* 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]} {