1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-06-09 06:10:42 +00:00

Feature: Added httpp_get_param() which does POST, then queryparams

This commit is contained in:
Philipp Schafft 2018-06-18 21:36:19 +00:00
parent 937268e288
commit 31f24e9869
2 changed files with 11 additions and 0 deletions

View File

@ -596,6 +596,16 @@ const char *httpp_get_post_param(http_parser_t *parser, const char *name)
return _httpp_get_param(parser->postvars, name);
}
const char *httpp_get_param(http_parser_t *parser, const char *name)
{
const char *ret = _httpp_get_param(parser->postvars, name);
if (ret)
return ret;
return _httpp_get_param(parser->queryvars, name);
}
void httpp_clear(http_parser_t *parser)
{
parser->req_type = httpp_req_none;

View File

@ -106,6 +106,7 @@ void httpp_set_query_param(http_parser_t *parser, const char *name, const char *
const char *httpp_get_query_param(http_parser_t *parser, const char *name);
void httpp_set_post_param(http_parser_t *parser, const char *name, const char *value);
const char *httpp_get_post_param(http_parser_t *parser, const char *name);
const char *httpp_get_param(http_parser_t *parser, const char *name);
void httpp_destroy(http_parser_t *parser);
void httpp_clear(http_parser_t *parser);