path: root/utils/nsurl.h
diff options
authorVincent Sanders <>2018-09-26 09:39:09 +0100
committerVincent Sanders <>2018-09-26 17:21:33 +0100
commit9100fcb4095cf8858d4cd2c613bff69ceb4f71ec (patch)
treeaad9e4c8246f10ba5d12d8175bcec5fdc3b3f0dc /utils/nsurl.h
parent83512a6ff529c7c5cb6315167cba1cf132e6a67a (diff)
improve nsurl query handling.
Alter the handling of query values within nsurl to be like fragments. This ensures callers never have to care about the query punctuation, e.g. the question mark This also means the strings generated will no longer have trailing question marks which now conforms to behaviour in whatwg url spec on url serializing in section 4.5
Diffstat (limited to 'utils/nsurl.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/nsurl.h b/utils/nsurl.h
index bc6e910a6..c6590bdbb 100644
--- a/utils/nsurl.h
+++ b/utils/nsurl.h
@@ -313,6 +313,9 @@ nserror nsurl_refragment(const nsurl *url, lwc_string *frag, nsurl **new_url);
* the created object.
* Any query component in url is replaced with query in new_url.
+ *
+ * Passing the empty string as a replacement will result in the query
+ * component being removed.
nserror nsurl_replace_query(const nsurl *url, const char *query,
nsurl **new_url);