diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-01-21 20:25:42 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-01-21 22:29:31 -0800 |
| commit | 5b1a3af7be4ae712868ae84b9a7d5a974d272b16 (patch) | |
| tree | 960cf1b0843d1e5fbd879d1d0c1d31ab705e30c9 /src/core/url.h | |
| parent | 7dbc9ae4fef34c6fd836b939bd559e54b8008b72 (diff) | |
| download | nng-5b1a3af7be4ae712868ae84b9a7d5a974d272b16.tar.gz nng-5b1a3af7be4ae712868ae84b9a7d5a974d272b16.tar.bz2 nng-5b1a3af7be4ae712868ae84b9a7d5a974d272b16.zip | |
fixes #217 URL canonicalization needs work
Diffstat (limited to 'src/core/url.h')
| -rw-r--r-- | src/core/url.h | 21 |
1 files changed, 0 insertions, 21 deletions
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 |
