Browse Source

[uri] Support "file:" URIs describing relative paths

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
75496817c2
2 changed files with 3 additions and 3 deletions
  1. 1
    1
      src/core/uri.c
  2. 2
    2
      src/tests/uri_test.c

+ 1
- 1
src/core/uri.c View File

157
 		 * the reparsing of the URI, allowing everything else
157
 		 * the reparsing of the URI, allowing everything else
158
 		 * (e.g. ':', which will appear in iSCSI URIs).
158
 		 * (e.g. ':', which will appear in iSCSI URIs).
159
 		 */
159
 		 */
160
-		[URI_OPAQUE]	= "/#",
160
+		[URI_OPAQUE]	= "#",
161
 		/* User name: escape everything */
161
 		/* User name: escape everything */
162
 		[URI_USER]	= "/#:@?",
162
 		[URI_USER]	= "/#:@?",
163
 		/* Password: escape everything */
163
 		/* Password: escape everything */

+ 2
- 2
src/tests/uri_test.c View File

612
 
612
 
613
 /** File URI with relative (opaque) path */
613
 /** File URI with relative (opaque) path */
614
 static struct uri_test uri_file_relative = {
614
 static struct uri_test uri_file_relative = {
615
-	"file:script.ipxe",
615
+	"file:boot/script.ipxe",
616
 	{
616
 	{
617
 		.scheme = "file",
617
 		.scheme = "file",
618
-		.opaque = "script.ipxe",
618
+		.opaque = "boot/script.ipxe",
619
 	},
619
 	},
620
 };
620
 };
621
 
621
 

Loading…
Cancel
Save