diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-04-04 11:16:27 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-04-04 11:16:27 (GMT) |
commit | 3899582e36ab11dba2246f3fe06e894adfaecb2c (patch) | |
tree | e6884fecc8d21bfeed06a999928a9d3aee9c2650 /library | |
parent | 209f05b7631920f54f0f5c780e50c4bb47e3dc28 (diff) | |
download | tcl-3899582e36ab11dba2246f3fe06e894adfaecb2c.zip tcl-3899582e36ab11dba2246f3fe06e894adfaecb2c.tar.gz tcl-3899582e36ab11dba2246f3fe06e894adfaecb2c.tar.bz2 |
Fix [e5ed1bb28b]: Issue if URL contains numeric IPv6 address. http -> 2.9.6
Diffstat (limited to 'library')
-rw-r--r-- | library/http/http.tcl | 5 | ||||
-rw-r--r-- | library/http/pkgIndex.tcl | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl index b0f87de..c4f165b 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.9.5 +package provide http 2.9.6 namespace eval http { # Allow resourcing to not clobber existing data @@ -1310,8 +1310,7 @@ proc http::Connected {token proto phost srvurl} { set sock $state(sock) set isQueryChannel [info exists state(-querychannel)] set isQuery [info exists state(-query)] - set host [lindex [split $state(socketinfo) :] 0] - set port [lindex [split $state(socketinfo) :] 1] + regexp {^(.+):([^:]+)$} $state(socketinfo) {} host port set lower [string tolower $proto] set defport [lindex $urlTypes($lower) 0] diff --git a/library/http/pkgIndex.tcl b/library/http/pkgIndex.tcl index 74c4841..7249547 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.9.5 [list tclPkgSetup $dir http 2.9.5 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] +package ifneeded http 2.9.6 [list tclPkgSetup $dir http 2.9.6 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}] |