summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authoroehhar <harald.oehlmann@elmicron.de>2018-04-18 11:59:57 (GMT)
committeroehhar <harald.oehlmann@elmicron.de>2018-04-18 11:59:57 (GMT)
commit327595170bbc91997186ac34d44238537e330cd5 (patch)
tree1034239d6218642e663f7e1c51cee9cedb3f7f26 /library
parent6b8039a9524bb88679e0d837a5345f26c8654a52 (diff)
downloadtcl-327595170bbc91997186ac34d44238537e330cd5.zip
tcl-327595170bbc91997186ac34d44238537e330cd5.tar.gz
tcl-327595170bbc91997186ac34d44238537e330cd5.tar.bz2
http::geturl now returns full error stack information if the initial socket command fails Ticket [ff82755e15]
Diffstat (limited to 'library')
-rw-r--r--library/http/http.tcl7
-rw-r--r--library/http/pkgIndex.tcl2
2 files changed, 5 insertions, 4 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index 9f5310b..186d067 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -11,7 +11,7 @@
package require Tcl 8.6-
# Keep this in sync with pkgIndex.tcl and with the install directories in
# Makefiles
-package provide http 2.8.12
+package provide http 2.8.13
namespace eval http {
# Allow resourcing to not clobber existing data
@@ -602,7 +602,7 @@ proc http::geturl {url args} {
if {[info exists state(-myaddr)]} {
lappend sockopts -myaddr $state(-myaddr)
}
- if {[catch {eval $defcmd $sockopts $targetAddr} sock]} {
+ if {[catch {eval $defcmd $sockopts $targetAddr} sock errdict]} {
# something went wrong while trying to establish the connection.
# Clean up after events and such, but DON'T call the command
# callback (if available) because we're going to throw an
@@ -611,7 +611,8 @@ proc http::geturl {url args} {
set state(sock) $sock
Finish $token "" 1
cleanup $token
- return -code error $sock
+ dict unset errdict -level
+ return -options $errdict $sock
}
}
set state(sock) $sock
diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl
index d3fc7af..3324af9 100644
--- a/library/http/pkgIndex.tcl
+++ b/library/http/pkgIndex.tcl
@@ -1,2 +1,2 @@
if {![package vsatisfies [package provide Tcl] 8.6-]} {return}
-package ifneeded http 2.8.12 [list tclPkgSetup $dir http 2.8.12 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
+package ifneeded http 2.8.13 [list tclPkgSetup $dir http 2.8.13 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]