]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[uri] Support "file:" URIs describing relative paths
authorMichael Brown <mcb30@ipxe.org>
Mon, 14 Mar 2016 17:39:17 +0000 (17:39 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 14 Mar 2016 18:03:13 +0000 (18:03 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/uri.c
src/tests/uri_test.c

index 0abd8bdcd18f2d6b279f9a7bfc7f0326394e71ec..73ad2b227d6c20e1ce4e54577f641f71b550fcc8 100644 (file)
@@ -157,7 +157,7 @@ static int uri_character_escaped ( char c, unsigned int field ) {
                 * the reparsing of the URI, allowing everything else
                 * (e.g. ':', which will appear in iSCSI URIs).
                 */
-               [URI_OPAQUE]    = "/#",
+               [URI_OPAQUE]    = "#",
                /* User name: escape everything */
                [URI_USER]      = "/#:@?",
                /* Password: escape everything */
index add6e468c4de78686b546015e286c7beae8664c9..92c2f903719766e45a4d04364822233d6cb8104b 100644 (file)
@@ -612,10 +612,10 @@ static struct uri_test uri_iscsi = {
 
 /** File URI with relative (opaque) path */
 static struct uri_test uri_file_relative = {
-       "file:script.ipxe",
+       "file:boot/script.ipxe",
        {
                .scheme = "file",
-               .opaque = "script.ipxe",
+               .opaque = "boot/script.ipxe",
        },
 };