Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mongoose
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Gitlab has been updated. More info
here
.
Show more breadcrumbs
Ganil-acq
GANILinux
linux-service
library
mongoose
Commits
3aafbab9
Commit
3aafbab9
authored
14 years ago
by
Sergey Lyubka
Browse files
Options
Downloads
Patches
Plain Diff
better docstrings for mg_get_cookie() and mg_get_var()
parent
865ac097
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mongoose.h
+9
-3
9 additions, 3 deletions
mongoose.h
with
9 additions
and
3 deletions
mongoose.h
+
9
−
3
View file @
3aafbab9
...
@@ -204,7 +204,9 @@ const char *mg_get_header(const struct mg_connection *, const char *name);
...
@@ -204,7 +204,9 @@ const char *mg_get_header(const struct mg_connection *, const char *name);
* failure, dst[0] == '\0'.
* failure, dst[0] == '\0'.
*
*
* Return:
* Return:
* MG_SUCCESS, MG_NOT_FOUND or MG_BUFFER_TOO_SMALL
* MG_SUCCESS Variable value was successfully copied in the buffer.
* MG_NOT_FOUND Requested variable not found.
* MG_BUFFER_TOO_SMALL Destination buffer is too small to hold the value.
*/
*/
enum
mg_error_t
mg_get_var
(
const
char
*
data
,
size_t
data_len
,
enum
mg_error_t
mg_get_var
(
const
char
*
data
,
size_t
data_len
,
const
char
*
var_name
,
char
*
buf
,
size_t
buf_len
);
const
char
*
var_name
,
char
*
buf
,
size_t
buf_len
);
...
@@ -216,10 +218,14 @@ enum mg_error_t mg_get_qsvar(const struct mg_request_info *,
...
@@ -216,10 +218,14 @@ enum mg_error_t mg_get_qsvar(const struct mg_request_info *,
* Fetch value of certain cookie variable into the destination buffer.
* Fetch value of certain cookie variable into the destination buffer.
*
*
* Destination buffer is guaranteed to be '\0' - terminated. In case of
* Destination buffer is guaranteed to be '\0' - terminated. In case of
* failure, dst[0] == '\0'.
* failure, dst[0] == '\0'. Note that RFC allows many occurences of the same
* parameter. This function returns only first occurance.
*
*
* Return:
* Return:
* MG_SUCCESS, MG_NOT_FOUND or MG_BUFFER_TOO_SMALL
* MG_SUCCESS Cookie parameter was successfully copied in the buffer.
* MG_NOT_FOUND Either "Cookie:" header is not present at all, or the
* requested parameter is not found.
* MG_BUFFER_TOO_SMALL Destination buffer is too small to hold the value.
*/
*/
enum
mg_error_t
mg_get_cookie
(
const
struct
mg_connection
*
,
enum
mg_error_t
mg_get_cookie
(
const
struct
mg_connection
*
,
const
char
*
cookie_name
,
char
*
buf
,
size_t
buf_len
);
const
char
*
cookie_name
,
char
*
buf
,
size_t
buf_len
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment