Skip to content

Commit cb2eb96

Browse files
authored
fix(apigateway): support dynamic routes with equal sign (RFC3986) (#1737)
1 parent 118f3e9 commit cb2eb96

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

aws_lambda_powertools/event_handler/api_gateway.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
logger = logging.getLogger(__name__)
4141

4242
_DYNAMIC_ROUTE_PATTERN = r"(<\w+>)"
43-
_SAFE_URI = "-._~()'!*:@,;" # https://www.ietf.org/rfc/rfc3986.txt
43+
_SAFE_URI = "-._~()'!*:@,;=" # https://www.ietf.org/rfc/rfc3986.txt
4444
# API GW/ALB decode non-safe URI chars; we must support them too
4545
_UNSAFE_URI = "%<> \[\]{}|^" # noqa: W605
4646
_NAMED_GROUP_BOUNDARY_PATTERN = rf"(?P\1[{_SAFE_URI}{_UNSAFE_URI}\\w]+)"

tests/functional/event_handler/test_api_gateway.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ def get_network_account(account_id: str, network_id: str):
909909
[
910910
pytest.param(123456789, id="num"),
911911
pytest.param("[email protected]", id="email"),
912-
pytest.param("-._~'!*:@,;()", id="safe-rfc3986"),
912+
pytest.param("-._~'!*:@,;()=", id="safe-rfc3986"),
913913
pytest.param("%<>[]{}|^", id="unsafe-rfc3986"),
914914
],
915915
)

0 commit comments

Comments
 (0)