-rw-r--r-- | include/kingate/util.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/kingate/util.h b/include/kingate/util.h index 6024ccf..3fd96f6 100644 --- a/include/kingate/util.h +++ b/include/kingate/util.h @@ -23,16 +23,29 @@ namespace kingate { /** * Remove URL-encoding from the string. * @param str the URL-encoded string. * @return the decoded string. */ string url_decode(const string& str); /** + * Quote string for use in HTTP header. + * @param str the string to quote. + * @return the quoted string. + */ + string http_quoted_string(const string& str); + /** + * Quote string for use in HTTP header if necessary. + * @param str the string to quote. + * @return the quoted string or token left as is. + */ + string http_quote(const string& str); + + /** * deprecated alias to url_encode. * @see url_encode */ inline string __deprecated url_escape(const string& str) { return url_encode(str); } /** * deprecated alias to url_decode. |