From 5b1a3af7be4ae712868ae84b9a7d5a974d272b16 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 21 Jan 2018 20:25:42 -0800 Subject: fixes #217 URL canonicalization needs work --- src/core/url.h | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/core/url.h') diff --git a/src/core/url.h b/src/core/url.h index 91054dcb..f99d6eb4 100644 --- a/src/core/url.h +++ b/src/core/url.h @@ -29,25 +29,4 @@ struct nni_url { extern int nni_url_parse(nni_url **, const char *path); extern void nni_url_free(nni_url *); -// nni_url_decode decodes the string, converting escaped characters to their -// proper form. The newly allocated string is returned in the first argument -// and may be freed with nni_strfree(). Note that we return EINVAL in the -// presence of an encoding of a control character. (Most especially NUL -// would cause problems for C code, but the other control characters have -// no business inside a URL either.) -extern int nni_url_decode(char **, const char *); - -// nni_url_encode works like nni_url_decode, but does the opposite transform. -// "Reserved" special characters (such as "/" and "@") are encoded, so don't -// use this to encode the entire URL.) This is most useful when encoding -// individual components, such as a value for a query parameter. Note that -// this returns NNG_EINVAL if the input string contains control characters, -// as those have no business inside a URL. -extern int nni_url_encode(char **, const char *); - -// nni_url_encode_ext works like nni_url_encode, but passes the named -// special characters. For example, to URL encode all elements in a path -// while preserving director separators, use the string "/" for specials. -extern int nni_url_encode_ext(char **, const char *, const char *); - #endif // CORE_URL_H -- cgit v1.2.3-70-g09d2