summaryrefslogtreecommitdiffstats
path: root/src/net/tcp
diff options
context:
space:
mode:
authorMichael Brown2015-08-25 13:33:40 +0200
committerMichael Brown2015-08-25 14:31:46 +0200
commitba3695353add020b686547699ba5e259c339bfa6 (patch)
treed400084f87152adbbbc7dbca3140c1c2789c03b0 /src/net/tcp
parent[autoboot] Display image information as part of the default control flow (diff)
downloadipxe-ba3695353add020b686547699ba5e259c339bfa6.tar.gz
ipxe-ba3695353add020b686547699ba5e259c339bfa6.tar.xz
ipxe-ba3695353add020b686547699ba5e259c339bfa6.zip
[settings] Re-add "uristring" setting type
Commit 09b057c ("[settings] Remove "uristring" setting type") removed support for URI-encoded settings via the "uristring" setting type, on the basis that such encoding was no longer necessary to avoid problems with the command line parser. Other valid use cases for the "uristring" setting type do exist: for example, a password containing a '/' character expanded via chain http://username:${password:uristring}@server.name/boot.php Restore the existence of the "uristring" setting, avoiding the potentially large stack allocations that were used in the old code prior to commit 09b057c ("[settings] Remove "uristring" setting type"). Requested-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/tcp')
-rw-r--r--src/net/tcp/httpcore.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/tcp/httpcore.c b/src/net/tcp/httpcore.c
index af3ca978..f3685de0 100644
--- a/src/net/tcp/httpcore.c
+++ b/src/net/tcp/httpcore.c
@@ -1826,7 +1826,7 @@ static size_t http_params ( struct parameters *params, char *buf, size_t len ) {
}
/* URI-encode the key */
- frag_len = uri_encode ( param->key, 0, buf, remaining );
+ frag_len = uri_encode_string ( 0, param->key, buf, remaining );
buf += frag_len;
len += frag_len;
remaining -= frag_len;
@@ -1839,7 +1839,7 @@ static size_t http_params ( struct parameters *params, char *buf, size_t len ) {
remaining--;
/* URI-encode the value */
- frag_len = uri_encode ( param->value, 0, buf, remaining );
+ frag_len = uri_encode_string ( 0, param->value, buf, remaining);
buf += frag_len;
len += frag_len;
remaining -= frag_len;