From 185c0cfd19e6c46fe4749ccc09d4b994a1200925 Mon Sep 17 00:00:00 2001 From: sandeep Date: Wed, 22 Mar 2000 21:18:24 +0000 Subject: 2000-03-22 Sandeep Tamhankar * library/http2.1/http.tcl: Fixed bug 4463, where we were getting a stack trace if we tried to publish a project to a good host but a port where there was no server listening. It turned out the problem was a stray fileevent that needed to be cleared. Also, fixed a bug where http::code could stack trace if called on a bad token (one which didn't represent a successful geturl) by adding an http element to the state array in geturl. --- ChangeLog | 10 ++++++++++ library/http/http.tcl | 5 +++-- library/http2.1/http.tcl | 5 +++-- library/http2.3/http.tcl | 5 +++-- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6cffa1c..72eb19b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-03-22 Sandeep Tamhankar + + * library/http2.1/http.tcl: Fixed bug 4463, where we were getting + a stack trace if we tried to publish a project to a good host but + a port where there was no server listening. It turned out the + problem was a stray fileevent that needed to be cleared. Also, + fixed a bug where http::code could stack trace if called on a bad + token (one which didn't represent a successful geturl) by adding + an http element to the state array in geturl. + 2000-03-21 Eric Melski * tests/clock.test: Modified some tests that were not robust with diff --git a/library/http/http.tcl b/library/http/http.tcl index a0e50d2..158698b 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.24 2000/03/19 23:45:38 sandeep Exp $ +# RCS: @(#) $Id: http.tcl,v 1.25 2000/03/22 21:18:25 sandeep Exp $ package provide http 2.3 ;# This uses Tcl namespaces @@ -227,6 +227,7 @@ proc http::geturl { url args } { type text/html body {} status "" + http "" } set options {-blocksize -channel -command -handler -headers \ -progress -query -queryblocksize -querychannel -queryprogress\ @@ -331,10 +332,10 @@ proc http::geturl { url args } { if {$state(-timeout) > 0} { fileevent $s writable [list http::Connect $token] http::wait $token + fileevent $s writable {} if {![string equal $state(status) "connect"]} { return $token } - fileevent $s writable {} set state(status) "" } diff --git a/library/http2.1/http.tcl b/library/http2.1/http.tcl index a0e50d2..158698b 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.24 2000/03/19 23:45:38 sandeep Exp $ +# RCS: @(#) $Id: http.tcl,v 1.25 2000/03/22 21:18:25 sandeep Exp $ package provide http 2.3 ;# This uses Tcl namespaces @@ -227,6 +227,7 @@ proc http::geturl { url args } { type text/html body {} status "" + http "" } set options {-blocksize -channel -command -handler -headers \ -progress -query -queryblocksize -querychannel -queryprogress\ @@ -331,10 +332,10 @@ proc http::geturl { url args } { if {$state(-timeout) > 0} { fileevent $s writable [list http::Connect $token] http::wait $token + fileevent $s writable {} if {![string equal $state(status) "connect"]} { return $token } - fileevent $s writable {} set state(status) "" } diff --git a/library/http2.3/http.tcl b/library/http2.3/http.tcl index a0e50d2..158698b 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.24 2000/03/19 23:45:38 sandeep Exp $ +# RCS: @(#) $Id: http.tcl,v 1.25 2000/03/22 21:18:25 sandeep Exp $ package provide http 2.3 ;# This uses Tcl namespaces @@ -227,6 +227,7 @@ proc http::geturl { url args } { type text/html body {} status "" + http "" } set options {-blocksize -channel -command -handler -headers \ -progress -query -queryblocksize -querychannel -queryprogress\ @@ -331,10 +332,10 @@ proc http::geturl { url args } { if {$state(-timeout) > 0} { fileevent $s writable [list http::Connect $token] http::wait $token + fileevent $s writable {} if {![string equal $state(status) "connect"]} { return $token } - fileevent $s writable {} set state(status) "" } -- cgit v0.12