0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd::http: Allow elision of leading slash and empty '?' query.

This commit is contained in:
Jason Volk 2017-04-06 16:54:47 -07:00
parent 6097e82974
commit 4b2b7ea292

View file

@ -165,7 +165,7 @@ struct grammar
rule<string_view> query_val { raw[*(char_ - query_illegal)] ,"query value" };
rule<string_view> method { token ,"method" };
rule<string_view> path { slash >> raw[*(char_ - query_illegal)] ,"path" };
rule<string_view> path { -slash >> raw[*(char_ - query_illegal)] ,"path" };
rule<string_view> fragment { pound >> -token ,"fragment" };
rule<string_view> version { token ,"version" };
@ -177,7 +177,7 @@ struct grammar
rule<string_view> query_string
{
question >> raw[(query_key >> -(equal >> query_val)) % ampersand]
question >> -raw[(query_key >> -(equal >> query_val)) % ampersand]
,"query string"
};