mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-16 10:39:49 +00:00
Export mg_url_decode() to public
PUBLISHED_FROM=442534f52992be612a98a549e5ab2191081a9d52
This commit is contained in:
1 parent
f5ad19d76b
commit
c948a509fb
2 files changed
+15
-2
No files matched your search
+2
-2
@@ -4851,8 +4851,8 @@ static void remove_double_dots(char *s) {
|
||||
|
||||
#endif
|
||||
|
||||
static int mg_url_decode(const char *src, int src_len, char *dst, int dst_len,
|
||||
int is_form_url_encoded) {
|
||||
int mg_url_decode(const char *src, int src_len, char *dst, int dst_len,
|
||||
int is_form_url_encoded) {
|
||||
int i, j, a, b;
|
||||
#define HEXTOI(x) (isdigit(x) ? x - '0' : x - 'W')
|
||||
|
||||
|
||||
+13
@@ -1690,6 +1690,19 @@ size_t mg_parse_multipart(const char *buf, size_t buf_len, char *var_name,
|
||||
*/
|
||||
int mg_get_http_var(const struct mg_str *, const char *, char *dst, size_t);
|
||||
|
||||
/*
|
||||
* Decode URL-encoded string.
|
||||
*
|
||||
* Source string is specified by (`src`, `src_len`), and destination is
|
||||
* (`dst`, `dst_len`). If `is_form_url_encoded` is non-zero, then
|
||||
* `+` character is decoded as a blank space character. This function
|
||||
* guarantees to `\0`-terminate the destination. If destination is too small,
|
||||
* then source string is partially decoded and `-1` is returned. Otherwise,
|
||||
* a length of decoded string is returned, not counting final `\0`.
|
||||
*/
|
||||
int mg_url_decode(const char *src, int src_len, char *dst, int dst_len,
|
||||
int is_form_url_encoded);
|
||||
|
||||
/* Create Digest authentication header for client request. */
|
||||
int mg_http_create_digest_auth_header(char *buf, size_t buf_len,
|
||||
const char *method, const char *uri,
|
||||
|
||||
Reference in new issue
Block a user