1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-06-16 06:15:24 +00:00

Feature: Added httpp_get_param_var() so multi-value access is possible

This commit is contained in:
Philipp Schafft 2018-07-26 12:59:23 +00:00
parent 53c13dd00e
commit 7d2b9fa3fd
2 changed files with 11 additions and 0 deletions

View File

@ -653,6 +653,16 @@ const char *httpp_get_post_param(http_parser_t *parser, const char *name)
return _httpp_get_param(parser->postvars, name);
}
const http_var_t *httpp_get_param_var(http_parser_t *parser, const char *name)
{
http_var_t *ret = _httpp_get_param_var(parser->postvars, name);
if (ret)
return ret;
return _httpp_get_param_var(parser->queryvars, name);
}
const char *httpp_get_param(http_parser_t *parser, const char *name)
{
const char *ret = _httpp_get_param(parser->postvars, name);

View File

@ -113,6 +113,7 @@ 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);
const http_var_t *httpp_get_param_var(http_parser_t *parser, const char *name);
void httpp_destroy(http_parser_t *parser);
void httpp_clear(http_parser_t *parser);