Overview
Comment: | OFURI: Always parse query and fragment |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
88765bceebc4283bc305c4fdaa6b20b7 |
User & Date: | js on 2022-10-03 19:10:04 |
Other Links: | manifest | tags |
Context
2022-10-03
| ||
19:51 | Rename objfw-embedded: scheme to of-embedded: check-in: 7d0456fdd6 user: js tags: trunk | |
19:10 | OFURI: Always parse query and fragment check-in: 88765bceeb user: js tags: trunk | |
00:39 | OFURI: Rewrite parser to support URIs check-in: c75059a52f user: js tags: trunk | |
Changes
Modified src/OFURI.m from [91ee9c8850] to [f265de725c].
︙ | |||
619 620 621 622 623 624 625 | 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 | - - + - - - - - - - - | UTF8String += authorityLength; length -= authorityLength; if (length > 0) OFEnsure(UTF8String[0] == '/'); } |
︙ |
Modified tests/OFURITests.m from [e76e355dc0] to [3dbd156552].
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + | R(URI3 = [OFURI URIWithString: @"http://bar/"]) && R(URI4 = [OFURI URIWithString: @"file:///etc/passwd"]) && R(URI5 = [OFURI URIWithString: @"http://foo/bar/qux/foo%2fbar"]) && R(URI6 = [OFURI URIWithString: @"https://[12:34::56:abcd]/"]) && R(URI7 = [OFURI URIWithString: @"https://[12:34::56:abcd]:234/"]) && R(URI8 = [OFURI URIWithString: @"urn:qux:foo"]) && R(URI9 = [OFURI URIWithString: @"file:/foo?query#frag"]) && |
︙ | |||
69 70 71 72 73 74 75 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - - - - - - - - | OFInvalidFormatException, [OFURI URIWithString: @"https://[f]:/"]) EXPECT_EXCEPTION(@"+[URIWithString:] fails with invalid characters #8", OFInvalidFormatException, [OFURI URIWithString: @"https://[f]:f/"]) |
︙ | |||
152 153 154 155 156 157 158 | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + | [URI3.string isEqual: @"http://bar/"] && [URI4.string isEqual: @"file:///etc/passwd"] && [URI5.string isEqual: @"http://foo/bar/qux/foo%2fbar"] && [URI6.string isEqual: @"https://[12:34::56:abcd]/"] && [URI7.string isEqual: @"https://[12:34::56:abcd]:234/"] && [URI8.string isEqual: @"urn:qux:foo"] && [URI9.string isEqual: @"file:/foo?query#frag"] && |
︙ | |||
195 196 197 198 199 200 201 | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | - + - + + | [[[OFURI URIWithString: @"http://host/foo/"] lastPathComponent] isEqual: @"foo"] && [[[OFURI URIWithString: @"http://host/"] lastPathComponent] isEqual: @"/"] && [URI5.lastPathComponent isEqual: @"foo/bar"]) TEST(@"-[query]", [URI1.query isEqual: @"que#ry=1&f&oo=b=ar"] && URI4.query == nil && |
︙ |