diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-10-30 08:58:34 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-11-02 16:36:52 +1100 |
commit | 7a290130bdeb411625f16451af3f2cfd25eeaf00 (patch) | |
tree | 82b74fbc027b4e6b1bee746c7f1e6605f1e0b9e0 /lib/util/util.h | |
parent | 87195f55de771546ea74c0ab06d882f900588099 (diff) | |
download | samba-7a290130bdeb411625f16451af3f2cfd25eeaf00.tar.gz samba-7a290130bdeb411625f16451af3f2cfd25eeaf00.tar.bz2 samba-7a290130bdeb411625f16451af3f2cfd25eeaf00.zip |
lib/util Use rfc1738.c from Squid for all our URL encode/decode needs.
Andrew Bartlett
Diffstat (limited to 'lib/util/util.h')
-rw-r--r-- | lib/util/util.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/util/util.h b/lib/util/util.h index c766e3dce7..159f812d98 100644 --- a/lib/util/util.h +++ b/lib/util/util.h @@ -307,6 +307,31 @@ _PUBLIC_ void all_string_sub(char *s,const char *pattern,const char *insert, siz **/ _PUBLIC_ void rfc1738_unescape(char *buf); + +/** + * rfc1738_escape + * Returns a static buffer that contains the RFC + * 1738 compliant, escaped version of the given url. (escapes unsafe and % characters) + **/ +_PUBLIC_ char *rfc1738_escape(TALLOC_CTX *mem_ctx, const char *url); + +/** + * rfc1738_escape_unescaped + * + * Returns a static buffer that contains + * the RFC 1738 compliant, escaped version of the given url (escapes unsafe chars only) + **/ +_PUBLIC_ char *rfc1738_escape_unescaped(TALLOC_CTX *mem_ctx, const char *url); + +/** + * rfc1738_escape_part + * Returns a static buffer that contains the RFC + * 1738 compliant, escaped version of the given url segment. (escapes + * unsafe, reserved and % chars) It would mangle the :// in http://, + * and mangle paths (because of /). + **/ +_PUBLIC_ char *rfc1738_escape_part(TALLOC_CTX *mem_ctx, const char *url); + /** format a string into length-prefixed dotted domain format, as used in NBT and in some ADS structures |