Skip to content

Commit

Permalink
[enhance] UriParser: accept query element without the equal sign
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Ye committed May 29, 2012
1 parent 8b87a09 commit 566e211
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stdlib/core/web/core/uri.opa
Expand Up @@ -265,7 +265,9 @@ UriParser =
segs = Rule.parse_list_non_empty(domain_segment, parser [.])
parser ls=segs -> List.to_string_using("", "", ".", ls)

query_element = parser key=chars_query "=" value=opt_chars_query -> (key, value)
query_element = parser
| key=chars_query "=" value=opt_chars_query -> (key, value)
| key=chars_query -> (key, "")
query_parser = Rule.parse_list(query_element, parser [&;] -> void)

query =
Expand Down

0 comments on commit 566e211

Please sign in to comment.