Skip to content
Merged
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
Add missing RawHttpPath extension to WebSockets
Signed-off-by: David Calavera <[email protected]>
  • Loading branch information
calavera committed May 19, 2023
commit 0c735a01449a5b7708fbe615075ca7c7923378a1
4 changes: 3 additions & 1 deletion lambda-http/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ fn into_websocket_request(ag: ApiGatewayWebsocketProxyRequest) -> http::Request<
.get(http::header::HOST)
.and_then(|s| s.to_str().ok())
.or(ag.request_context.domain_name.as_deref());
let path = apigw_path_with_stage(&ag.request_context.stage, &ag.path.unwrap_or_default());
let raw_path = ag.path.unwrap_or_default();
let path = apigw_path_with_stage(&ag.request_context.stage, &raw_path);

let builder = http::Request::builder()
.uri(build_request_uri(
Expand All @@ -286,6 +287,7 @@ fn into_websocket_request(ag: ApiGatewayWebsocketProxyRequest) -> http::Request<
host,
Some((&ag.multi_value_query_string_parameters, &ag.query_string_parameters)),
))
.extension(RawHttpPath(raw_path))
// multi-valued query string parameters are always a super
// set of singly valued query string parameters,
// when present, multi-valued query string parameters are preferred
Expand Down