Use re.fullmatch() for route patterns
This commit is contained in:
parent
58d34db29d
commit
0b272d076d
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -2,14 +2,14 @@
|
||||||
|
|
||||||
### Unreleased
|
### Unreleased
|
||||||
|
|
||||||
- Allow virtual hosting by specifying an alternate hostname in the application
|
- A hostname can now be specified in route patterns, to facilitate virtual
|
||||||
route pattern.
|
hosting on a single jetforce server.
|
||||||
|
- Route patterns now use ``re.fullmatch()`` and will no longer trigger on
|
||||||
|
partial matches.
|
||||||
- Jetforce will no longer raise an exception when attempting to log dropped
|
- Jetforce will no longer raise an exception when attempting to log dropped
|
||||||
connections or other malformed requests.
|
connections or other malformed requests.
|
||||||
- Added the following CGI variables for client certificates:
|
- Added the following CGI variables for client certificates:
|
||||||
- TLS_CLIENT_NOT_BEFORE
|
TLS_CLIENT_NOT_BEFORE, TLS_CLIENT_NOT_AFTER, TLS_CLIENT_SERIAL_NUMBER
|
||||||
- TLS_CLIENT_NOT_AFTER
|
|
||||||
- TLS_CLIENT_SERIAL_NUMBER
|
|
||||||
|
|
||||||
### v0.2.0 (2012-01-21)
|
### v0.2.0 (2012-01-21)
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ class RoutePattern:
|
||||||
else:
|
else:
|
||||||
request_path = request.path.rstrip("/")
|
request_path = request.path.rstrip("/")
|
||||||
|
|
||||||
return bool(re.match(self.path, request_path))
|
return bool(re.fullmatch(self.path, request_path))
|
||||||
|
|
||||||
|
|
||||||
class JetforceApplication:
|
class JetforceApplication:
|
||||||
|
|
Loading…
Reference in New Issue