Skip to content

Commit d1e2054

Browse files
[Ticket dc50cc65ea]: Accept schema names case-insensitively. Report and patch by Harald Oehlmann. Version bumped to 1.2.3. Extended testsuite (uri-11.0).
1 parent 4b603b5 commit d1e2054

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

modules/uri/ChangeLog

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2013-11-07 Andreas Kupries <[email protected]>
2+
3+
* uri.tcl: [Ticket dc50cc65ea]: Accept schema names
4+
* uri.test: case-insensitively. Report and patch by Harald
5+
* pkgIndex.tcl: Oehlmann. Version bumped to 1.2.3. Extended
6+
testsuite (uri-11.0).
7+
18
2013-02-01 Andreas Kupries <[email protected]>
29

310
*

modules/uri/pkgIndex.tcl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ if {![package vsatisfies [package provide Tcl] 8.2]} {
22
# FRINK: nocheck
33
return
44
}
5-
package ifneeded uri 1.2.2 [list source [file join $dir uri.tcl]]
5+
package ifneeded uri 1.2.3 [list source [file join $dir uri.tcl]]
66
package ifneeded uri::urn 1.0.2 [list source [file join $dir urn-scheme.tcl]]

modules/uri/uri.tcl

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ proc ::uri::split {url {defaultscheme http}} {
166166
set scheme {}
167167

168168
# RFC 1738: scheme = 1*[ lowalpha | digit | "+" | "-" | "." ]
169-
regexp -- {^([a-z0-9+.-][a-z0-9+.-]*):} $url dummy scheme
169+
regexp -- {^([A-Za-z0-9+.-][A-Za-z0-9+.-]*):} $url dummy scheme
170170

171171
if {$scheme == {}} {
172172
set scheme $defaultscheme
@@ -181,7 +181,7 @@ proc ::uri::split {url {defaultscheme http}} {
181181

182182
regsub -- "^${scheme}:" $url {} url
183183

184-
set parts(scheme) $scheme
184+
set parts(scheme) [string tolower $scheme]
185185
array set parts [Split[string totitle $scheme] $url]
186186

187187
# should decode all encoded characters!
@@ -1035,4 +1035,4 @@ uri::register ldap {
10351035
variable url "ldap:$schemepart"
10361036
}
10371037

1038-
package provide uri 1.2.2
1038+
package provide uri 1.2.3

modules/uri/uri.test

+6
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,12 @@ test uri-10.1 {uri::join bug #3235340, fragments after queries} {
474474

475475
# -------------------------------------------------------------------------
476476

477+
test uri-11.0 {uri::split, case-insensitive schemata, ticket dc50cc65ea} {
478+
dictsort [uri::split hTTp://foo:[email protected]:80/bla/]
479+
} {fragment {} host baz.com path bla/ port 80 pwd bar query {} scheme http user foo}
480+
481+
# -------------------------------------------------------------------------
482+
477483

478484
testsuiteCleanup
479485
return

0 commit comments

Comments
 (0)