Open ydarma opened 7 years ago
re-Hi,
Actually, we have the same problem with all special characters. For instance a [ must be tested as (?:%5B)|\[
...
Since parsing of a HTTP path variables is outside of the scope of this project, you would have to implement this yourself. You could use ^/search?(.*)$
as regex and parse the path_match[1]
in the resource function.
Personally, I would not use the HTTP path to pass such variables though, since it is limited (essentially only an associate table of strings, strings (no object structure that is)), and use the content (body) in the request instead (and here be able to use a JSON structure for instance). Even though this might go against the HTTP recommendation for especially GET requests.
Hi,
first thank you for the Simple-Web-Server which is amazing.
If a path contains a whitespace, the \s pattern won't match. For instance :
^/search?q="two\s+words"$
We need to write instead :
^/search?q="two(?:(?:%20)|\s)+words"$
This is a bit annoying...
Thanks, Yves