summaryrefslogtreecommitdiffstats
path: root/library/http/http.tcl
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 /library/http/http.tcl
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]
Diffstat (limited to 'library/http/http.tcl')
-rw-r--r--library/http/http.tcl5
1 files changed, 3 insertions, 2 deletions
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]} {