summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorsandeep <sandeep@noemail.net>2000-03-29 20:19:58 (GMT)
committersandeep <sandeep@noemail.net>2000-03-29 20:19:58 (GMT)
commite57d523765ab57b3ede9686e23085a6e4fcbfe52 (patch)
treeea5e82551999ec440334e3db9d5a6b3ac133cfe6 /library
parentf7980cfc202d708d1a31abf81576539ecddf63a3 (diff)
downloadtcl-e57d523765ab57b3ede9686e23085a6e4fcbfe52.zip
tcl-e57d523765ab57b3ede9686e23085a6e4fcbfe52.tar.gz
tcl-e57d523765ab57b3ede9686e23085a6e4fcbfe52.tar.bz2
2000-03-29 Sandeep Tamhankar <sandeep@scriptics.com>
* library/http2.1/http.tcl: Removed an unnecessary fileevent statement from the error processing part of the Write method. Also, fixed two potential memory leaks in wait and reset, in which the state array wasn't being unset before throwing an exception. Prior to this version, Brent checked in a fix to catch a fileevent statement that was sometimes causing a stack trace when geturl was called with -timeout. I believe Brent's fix is necessary because TLS closes bad sockets for secure connections, and the fileevent was trying to act on a socket that no longer existed. FossilOrigin-Name: 21ce42ac0d1ec680a1b78a95600a3d55cc9b530c
Diffstat (limited to 'library')
-rw-r--r--library/http/http.tcl7
-rw-r--r--library/http2.1/http.tcl7
-rw-r--r--library/http2.3/http.tcl7
3 files changed, 9 insertions, 12 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index 16a6d05..617684c 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.27 2000/03/27 21:22:11 welch Exp $
+# RCS: @(#) $Id: http.tcl,v 1.28 2000/03/29 20:19:59 sandeep Exp $
package provide http 2.3 ;# This uses Tcl namespaces
@@ -177,7 +177,7 @@ proc http::reset { token {why reset} } {
Finish $token
if {[info exists state(error)]} {
set errorlist $state(error)
- unset state(error)
+ unset state
eval error $errorlist
}
}
@@ -545,7 +545,6 @@ proc http::Write {token} {
fileevent $s readable [list http::Event $token]
}
} err]} {
- fileevent $s writable {}
Finish $token $err
}
}
@@ -718,7 +717,7 @@ proc http::wait {token} {
}
if {[info exists state(error)]} {
set errorlist $state(error)
- unset state(error)
+ unset state
eval error $errorlist
}
return $state(status)
diff --git a/library/http2.1/http.tcl b/library/http2.1/http.tcl
index 16a6d05..617684c 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.27 2000/03/27 21:22:11 welch Exp $
+# RCS: @(#) $Id: http.tcl,v 1.28 2000/03/29 20:19:59 sandeep Exp $
package provide http 2.3 ;# This uses Tcl namespaces
@@ -177,7 +177,7 @@ proc http::reset { token {why reset} } {
Finish $token
if {[info exists state(error)]} {
set errorlist $state(error)
- unset state(error)
+ unset state
eval error $errorlist
}
}
@@ -545,7 +545,6 @@ proc http::Write {token} {
fileevent $s readable [list http::Event $token]
}
} err]} {
- fileevent $s writable {}
Finish $token $err
}
}
@@ -718,7 +717,7 @@ proc http::wait {token} {
}
if {[info exists state(error)]} {
set errorlist $state(error)
- unset state(error)
+ unset state
eval error $errorlist
}
return $state(status)
diff --git a/library/http2.3/http.tcl b/library/http2.3/http.tcl
index 16a6d05..617684c 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.27 2000/03/27 21:22:11 welch Exp $
+# RCS: @(#) $Id: http.tcl,v 1.28 2000/03/29 20:19:59 sandeep Exp $
package provide http 2.3 ;# This uses Tcl namespaces
@@ -177,7 +177,7 @@ proc http::reset { token {why reset} } {
Finish $token
if {[info exists state(error)]} {
set errorlist $state(error)
- unset state(error)
+ unset state
eval error $errorlist
}
}
@@ -545,7 +545,6 @@ proc http::Write {token} {
fileevent $s readable [list http::Event $token]
}
} err]} {
- fileevent $s writable {}
Finish $token $err
}
}
@@ -718,7 +717,7 @@ proc http::wait {token} {
}
if {[info exists state(error)]} {
set errorlist $state(error)
- unset state(error)
+ unset state
eval error $errorlist
}
return $state(status)