summaryrefslogtreecommitdiffstats
path: root/library/http
diff options
context:
space:
mode:
authorsandeep <sandeep>2000-03-22 21:18:24 (GMT)
committersandeep <sandeep>2000-03-22 21:18:24 (GMT)
commit185c0cfd19e6c46fe4749ccc09d4b994a1200925 (patch)
treebc319027bd5fb02ab28baa55bb900050399480c4 /library/http
parent389f53d5a6f9d3996e26ec045bee129dc58b8418 (diff)
downloadtcl-185c0cfd19e6c46fe4749ccc09d4b994a1200925.zip
tcl-185c0cfd19e6c46fe4749ccc09d4b994a1200925.tar.gz
tcl-185c0cfd19e6c46fe4749ccc09d4b994a1200925.tar.bz2
2000-03-22 Sandeep Tamhankar <sandeep@scriptics.com>
* 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.
Diffstat (limited to 'library/http')
-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 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) ""
}