summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorsandeep <sandeep@noemail.net>2000-03-19 23:45:38 (GMT)
committersandeep <sandeep@noemail.net>2000-03-19 23:45:38 (GMT)
commitc54f78382abbcd3e6183da9152b524a80f4d52da (patch)
treeeb02f124ee8700d3575305b094b79b6634e36dfd /library
parent59d736852dbaa8e246acce0fa47843f9161d11f3 (diff)
downloadtcl-c54f78382abbcd3e6183da9152b524a80f4d52da.zip
tcl-c54f78382abbcd3e6183da9152b524a80f4d52da.tar.gz
tcl-c54f78382abbcd3e6183da9152b524a80f4d52da.tar.bz2
2000-03-19 Sandeep Tamhankar <sandeep@scriptics.com>scriptics-sc-2-0-b1
* 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). FossilOrigin-Name: f3a17a1b813755855daac429321d18cc36d26e84
Diffstat (limited to 'library')
-rw-r--r--library/http/http.tcl15
-rw-r--r--library/http2.1/http.tcl15
-rw-r--r--library/http2.3/http.tcl15
3 files changed, 30 insertions, 15 deletions
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