Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MicroWebSrv2/webRoute.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def RegisterRoute(handler, method, routePath, name=None) :
if not argName :
raise Exception
argNames.append(argName)
regex += '/([\\w.]*)'
regex += '/([A-Za-z0-9_.]*)'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A suggestion here. Can we add support for whitespace as well? In order to support links like
http://example.com/some page that would be translated from web browsers with a %20
I have tested in CPython to add \s and works but if micropython can't support \w I am not sure how to handle it

else :
regex += '/' + part
regex = re.compile(regex + '$')
Expand Down