Closed SethHamilton closed 6 years ago
UTF-8 characters of 2 or more bytes should not be percent encoded I think, but they would be included in your expression if I'm not mistaken.
Sorry for the late response. I'm not certain UTF-8 must be encoded, but both your current code and my example don't take this into account. the issue I have with the current code is this that parameters that are simply numeric (and valid) like someparam=123
are being encoded, and that isn't great (reduced readability and overhead).
Thank you, after some additional reading I modified your expression by adding a couple more characters (according to http://www.ietf.org/rfc/rfc3986.txt), and added more tests. Your issue should now be fixed.
@eidheim thank you kindly.
https://github.com/eidheim/Simple-Web-Server/blob/1552cdc11acf0baedceb1e146824411506fc12d7/utility.hpp#L51
I think line could be:
Basically
0-9
,a-z
,A-Z
and-
and_
are all good to go.