From 75496817c2d28aef8b91fce8185814f8d39f69ab Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 14 Mar 2016 17:39:17 +0000 Subject: [PATCH] [uri] Support "file:" URIs describing relative paths Signed-off-by: Michael Brown --- src/core/uri.c | 2 +- src/tests/uri_test.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/uri.c b/src/core/uri.c index 0abd8bdcd..73ad2b227 100644 --- a/src/core/uri.c +++ b/src/core/uri.c @@ -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 */ diff --git a/src/tests/uri_test.c b/src/tests/uri_test.c index add6e468c..92c2f9037 100644 --- a/src/tests/uri_test.c +++ b/src/tests/uri_test.c @@ -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", }, };