summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-04-09 17:01:35 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-04-09 17:01:35 (GMT)
commitc67ebc59a77414e7ae761c6b723c2bf49821c829 (patch)
treeb5c59dedc372c16a4fb1df15836ca078654378e1
parent9bc6349d687303e2396272aa45de0d38a16e87f5 (diff)
downloadtcl-c67ebc59a77414e7ae761c6b723c2bf49821c829.zip
tcl-c67ebc59a77414e7ae761c6b723c2bf49821c829.tar.gz
tcl-c67ebc59a77414e7ae761c6b723c2bf49821c829.tar.bz2
* library/http/http.tcl: Handle incomplete lines in the
"connecting" state. Thanks to Sergei Golovan. [Bug 26245326]
-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]} {