summaryrefslogtreecommitdiffstats
path: root/src/tests/tests.c
diff options
context:
space:
mode:
authorMichael Brown2014-02-27 14:32:53 +0100
committerMichael Brown2014-02-27 14:32:53 +0100
commit76675365271291beb9ddaeec10da14f4faa55ecc (patch)
tree0143200258d478e381b9d492bead2bdda91fe865 /src/tests/tests.c
parent[params] Use reference counters for form parameter lists (diff)
downloadipxe-76675365271291beb9ddaeec10da14f4faa55ecc.tar.gz
ipxe-76675365271291beb9ddaeec10da14f4faa55ecc.tar.xz
ipxe-76675365271291beb9ddaeec10da14f4faa55ecc.zip
[uri] Refactor URI parsing and formatting
Add support for parsing of URIs containing literal IPv6 addresses (e.g. "http://[fe80::69ff:fe50:5845%25net0]/boot.ipxe"). Duplicate URIs by directly copying the relevant fields, rather than by formatting and reparsing a URI string. This relaxes the requirements on the URI formatting code and allows it to focus on generating human-readable URIs (e.g. by not escaping ':' characters within literal IPv6 addresses). As a side-effect, this allows relative URIs containing parameter lists (e.g. "../boot.php##params") to function as expected. Add validity check for FTP paths to ensure that only printable characters are accepted (since FTP is a human-readable line-based protocol with no support for character escaping). Construct TFTP next-server+filename URIs directly, rather than parsing a constructed "tftp://..." string, Add self-tests for URI functions. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/tests/tests.c')
-rw-r--r--src/tests/tests.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tests/tests.c b/src/tests/tests.c
index e5e096aa..6691ee90 100644
--- a/src/tests/tests.c
+++ b/src/tests/tests.c
@@ -53,3 +53,4 @@ REQUIRE_OBJECT ( pnm_test );
REQUIRE_OBJECT ( deflate_test );
REQUIRE_OBJECT ( png_test );
REQUIRE_OBJECT ( dns_test );
+REQUIRE_OBJECT ( uri_test );