Commit 7d2b9fa3 authored by Philipp Schafft's avatar Philipp Schafft 🦁

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

parent 53c13dd0
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment