Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
c948a509
Commit
c948a509
authored
Dec 03, 2015
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export mg_url_decode() to public
PUBLISHED_FROM=442534f52992be612a98a549e5ab2191081a9d52
parent
f5ad19d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
mongoose.c
mongoose.c
+2
-2
mongoose.h
mongoose.h
+13
-0
No files found.
mongoose.c
View file @
c948a509
...
...
@@ -4851,7 +4851,7 @@ 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
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')
...
...
mongoose.h
View file @
c948a509
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment