From 9a5af1a04872f24f49aefb7bfaf2966da6bd828d Mon Sep 17 00:00:00 2001 From: welch Date: Sat, 30 Oct 1999 00:31:58 +0000 Subject: Fixed bug in the handling of the status code after an asynchronous connect, e.g., one that is used with the -timeout flag. --- library/http/http.tcl | 5 ++--- library/http2.1/http.tcl | 5 ++--- library/http2.3/http.tcl | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/library/http/http.tcl b/library/http/http.tcl index 91a997b..7bcc04a 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.12 1999/10/21 02:16:37 hobbs Exp $ +# RCS: @(#) $Id: http.tcl,v 1.13 1999/10/30 00:31:58 welch Exp $ package provide http 2.1 ;# This uses Tcl namespaces @@ -233,14 +233,13 @@ proc http::geturl { url args } { # Wait for the connection to complete if {$state(-timeout) > 0} { - #fileevent $s writable [list set $token\(status) connect] fileevent $s writable [list http::Connect $token] http::wait $token if {[string equal $state(status) "timeout"]} { return } fileevent $s writable {} - unset state(status) + set state(status) "" } # Send data in cr-lf format, but accept any line terminators diff --git a/library/http2.1/http.tcl b/library/http2.1/http.tcl index 91a997b..7bcc04a 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.12 1999/10/21 02:16:37 hobbs Exp $ +# RCS: @(#) $Id: http.tcl,v 1.13 1999/10/30 00:31:58 welch Exp $ package provide http 2.1 ;# This uses Tcl namespaces @@ -233,14 +233,13 @@ proc http::geturl { url args } { # Wait for the connection to complete if {$state(-timeout) > 0} { - #fileevent $s writable [list set $token\(status) connect] fileevent $s writable [list http::Connect $token] http::wait $token if {[string equal $state(status) "timeout"]} { return } fileevent $s writable {} - unset state(status) + set state(status) "" } # Send data in cr-lf format, but accept any line terminators diff --git a/library/http2.3/http.tcl b/library/http2.3/http.tcl index 91a997b..7bcc04a 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.12 1999/10/21 02:16:37 hobbs Exp $ +# RCS: @(#) $Id: http.tcl,v 1.13 1999/10/30 00:31:58 welch Exp $ package provide http 2.1 ;# This uses Tcl namespaces @@ -233,14 +233,13 @@ proc http::geturl { url args } { # Wait for the connection to complete if {$state(-timeout) > 0} { - #fileevent $s writable [list set $token\(status) connect] fileevent $s writable [list http::Connect $token] http::wait $token if {[string equal $state(status) "timeout"]} { return } fileevent $s writable {} - unset state(status) + set state(status) "" } # Send data in cr-lf format, but accept any line terminators -- cgit v0.12