Quellcode durchsuchen

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

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown vor 8 Jahren
Ursprung
Commit
75496817c2
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 1
    1
      src/core/uri.c
  2. 2
    2
      src/tests/uri_test.c

+ 1
- 1
src/core/uri.c Datei anzeigen

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

+ 2
- 2
src/tests/uri_test.c Datei anzeigen

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

Laden…
Abbrechen
Speichern