Closed rcane closed 5 years ago
Thanks for reporting this! It requires some time to think... I'll take a timeout (hope it'll be short).
The master branch now contains an updated version. This version:
;
as a separator in query string;query_string_params_t::tag()
that returns optional_t<string_view_t>
. For a query like http://example.com/api/foo?1234
it'll return 1234
;parse_query
now handles tag (web beacon, tracing beacon) in query strings.Thanks for the quick update. This fixes my problem.
Although a query string usually contains key value pairs, it is perfectly legal to have a query like this:
http://example.com/api/foo?1234
This is used for example to implement tracking beacons. The current
parse_query()
implementation throws an exception given this query. I am not sure how to fix this.parse_query
returns a map of key value pairs. So it cannot deal with this in its current form. In my particular use case I would simply like to ignore such queries. So maybe there could be an option forparse_query
similar toexpress_router_t::http_get
's option to enable strict parse rules.Another potential problem with
parse_query
is that it only accepts&
as a separator. But W3C also recommends that servers support semicolon separators.