From 681c866be727a03776c6028f53bdae31049f770b Mon Sep 17 00:00:00 2001 From: sandeep Date: Sun, 19 Mar 2000 23:45:38 +0000 Subject: 2000-03-19 Sandeep Tamhankar * library/http2.1/http.tcl: geturl used to throw an exception when the connection failed; I accidentally returned a token with the error info, breaking backwards compatibility. I changed it back to throwing an exception, but unsetting the state array first (thus still eliminating the original memory leak problem). --- ChangeLog | 8 ++++++++ library/http/http.tcl | 15 ++++++++++----- library/http2.1/http.tcl | 15 ++++++++++----- library/http2.3/http.tcl | 15 ++++++++++----- 4 files changed, 38 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3924baa..7f0c2c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2000-03-19 Sandeep Tamhankar + * library/http2.1/http.tcl: geturl used to throw an exception when + the connection failed; I accidentally returned a token with the + error info, breaking backwards compatibility. I changed it back + to throwing an exception, but unsetting the state array first + (thus still eliminating the original memory leak problem). + +2000-03-19 Sandeep Tamhankar + * library/http2.1/http.tcl: Added -querychannel option and altered some of Brent's modifications to allow asynchronous posts (via -command). Also modified -queryprogress so that it calls the diff --git a/library/http/http.tcl b/library/http/http.tcl index b783dc7..a0e50d2 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.23 2000/03/19 22:32:26 sandeep Exp $ +# RCS: @(#) $Id: http.tcl,v 1.24 2000/03/19 23:45:38 sandeep Exp $ package provide http 2.3 ;# This uses Tcl namespaces @@ -314,10 +314,15 @@ proc http::geturl { url args } { set conStat [catch {eval $defcmd $async {$host $port}} s] } if {$conStat} { - # something went wrong, so unset the state array and propagate the - # error to the caller - Finish $token $s - return $token + # something went wrong while trying to establish the connection + # The proper response is probably to give the caller a token + # containing error info, but that would break backwards compatibility. + # So, let's follow tradition and throw an exception (after unsetting + # the array). + unset $token + error $s + #Finish $token $s + #return $token } set state(sock) $s diff --git a/library/http2.1/http.tcl b/library/http2.1/http.tcl index b783dc7..a0e50d2 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.23 2000/03/19 22:32:26 sandeep Exp $ +# RCS: @(#) $Id: http.tcl,v 1.24 2000/03/19 23:45:38 sandeep Exp $ package provide http 2.3 ;# This uses Tcl namespaces @@ -314,10 +314,15 @@ proc http::geturl { url args } { set conStat [catch {eval $defcmd $async {$host $port}} s] } if {$conStat} { - # something went wrong, so unset the state array and propagate the - # error to the caller - Finish $token $s - return $token + # something went wrong while trying to establish the connection + # The proper response is probably to give the caller a token + # containing error info, but that would break backwards compatibility. + # So, let's follow tradition and throw an exception (after unsetting + # the array). + unset $token + error $s + #Finish $token $s + #return $token } set state(sock) $s diff --git a/library/http2.3/http.tcl b/library/http2.3/http.tcl index b783dc7..a0e50d2 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.23 2000/03/19 22:32:26 sandeep Exp $ +# RCS: @(#) $Id: http.tcl,v 1.24 2000/03/19 23:45:38 sandeep Exp $ package provide http 2.3 ;# This uses Tcl namespaces @@ -314,10 +314,15 @@ proc http::geturl { url args } { set conStat [catch {eval $defcmd $async {$host $port}} s] } if {$conStat} { - # something went wrong, so unset the state array and propagate the - # error to the caller - Finish $token $s - return $token + # something went wrong while trying to establish the connection + # The proper response is probably to give the caller a token + # containing error info, but that would break backwards compatibility. + # So, let's follow tradition and throw an exception (after unsetting + # the array). + unset $token + error $s + #Finish $token $s + #return $token } set state(sock) $s -- cgit v0.12