Skip to content

Commit

Permalink
[autosync] aws-smithy-http-server: don't ignore empty path segments…
Browse files Browse the repository at this point in the history
… when routing (#1029)

In #996 [0], we realized that we were ignoring empty URI path segments
when doing label extraction. It turns out we are also ignoring them when
doing routing, as the TypeScript sSDK currently does [1], from which the
initial implementation was copied.

However, a discussion with the Smithy team in smithy-lang/smithy#1024 [2]
revealed that we _must not_ ignore empty URI path segments when routing
or doing label extraction, since empty strings (`""`) should be assigned
to the labels in those segments.

This commit fixes the behavior so that we don't ignore empty path
segments _when doing routing_. #996 will take care of fixing the behavior
when doing label extraction.

[0]: smithy-lang/smithy-rs#996 (comment)
[1]: https://github.com/awslabs/smithy-typescript/blob/d263078b81485a6a2013d243639c0c680343ff47/smithy-typescript-ssdk-libs/server-common/src/httpbinding/mux.ts#L78
[2]: smithy-lang/smithy#1024
  • Loading branch information
david-perez authored and Velfi committed Jan 19, 2022
1 parent 567738c commit deca319
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .smithyrs-githash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
78cad9e371835981ca77b11f9b4db5f2f8947886
611ebb646fd2a251eb59af1eabb9edaf96d13a15

0 comments on commit deca319

Please sign in to comment.