summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-07-16 08:33:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-07-16 08:33:13 (GMT)
commitda19d0dd6c320026b45f407302a2d0f55d67777f (patch)
tree19ecb9097ee39ac7b4dd159873af1be0a2802f4f /library
parentadecc7a1e1a45aab0805e6cb440eb3adf09e486a (diff)
parent5dff38707576522b97793ce6ad8024b0f92895bb (diff)
downloadtcl-da19d0dd6c320026b45f407302a2d0f55d67777f.zip
tcl-da19d0dd6c320026b45f407302a2d0f55d67777f.tar.gz
tcl-da19d0dd6c320026b45f407302a2d0f55d67777f.tar.bz2
merge trunk
Diffstat (limited to 'library')
-rw-r--r--library/http/http.tcl7
-rwxr-xr-xlibrary/reg/pkgIndex.tcl4
2 files changed, 7 insertions, 4 deletions
diff --git a/library/http/http.tcl b/library/http/http.tcl
index b5ce82b..2653c3e 100644
--- a/library/http/http.tcl
+++ b/library/http/http.tcl
@@ -419,7 +419,6 @@ proc http::geturl {url args} {
# Note that the RE actually combines the user and password parts, as
# recommended in RFC 3986. Indeed, that RFC states that putting passwords
# in URLs is a Really Bad Idea, something with which I would agree utterly.
- # Also note that we do not currently support IPv6 addresses.
#
# From a validation perspective, we need to ensure that the parts of the
# URL that are going to the server are correctly encoded. This is only
@@ -434,7 +433,10 @@ proc http::geturl {url args} {
[^@/\#?]+ # <userinfo part of authority>
) @
)?
- ( [^/:\#?]+ ) # <host part of authority>
+ ( # <host part of authority>
+ [^/:\#?]+ | # host name or IPv4 address
+ \[ [^/\#?]+ \] # IPv6 address in square brackets
+ )
(?: : (\d+) )? # <port part of authority>
)?
( / [^\#]*)? # <path> (including query)
@@ -448,6 +450,7 @@ proc http::geturl {url args} {
return -code error "Unsupported URL: $url"
}
# Phase two: validate
+ set host [string trim $host {[]}]; # strip square brackets from IPv6 address
if {$host eq ""} {
# Caller has to provide a host name; we do not have a "default host"
# that would enable us to handle relative URLs.
diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl
index f71b09f..55af4b3 100755
--- a/library/reg/pkgIndex.tcl
+++ b/library/reg/pkgIndex.tcl
@@ -1,5 +1,5 @@
-if {![package vsatisfies [package provide Tcl] 8.5]} return
-if {[info sharedlibextension] ne ".dll"} return
+if {([info commands ::tcl::pkgconfig] eq "")
+ || ([info sharedlibextension] ne ".dll")} return
if {[::tcl::pkgconfig get debug]} {
package ifneeded registry 1.3.0 \
[list load [file join $dir tclreg13g.dll] registry]