Pārlūkot izejas kodu

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

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 gadus atpakaļ
vecāks
revīzija
75496817c2
2 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 1
    1
      src/core/uri.c
  2. 2
    2
      src/tests/uri_test.c

+ 1
- 1
src/core/uri.c Parādīt failu

@@ -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 Parādīt failu

@@ -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
 

Notiek ielāde…
Atcelt
Saglabāt