Skip to content

Commit

Permalink
Only add URL query if it's not empty (#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
RaeesBhatti authored Oct 18, 2024
1 parent 1c63439 commit 19c190d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lambda-http/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ fn into_api_gateway_v2_request(ag: ApiGatewayV2httpRequest) -> http::Request<Bod

let mut uri = build_request_uri(&path, &ag.headers, host, None);
if let Some(query) = ag.raw_query_string {
uri.push('?');
uri.push_str(&query);
if !query.is_empty() {
uri.push('?');
uri.push_str(&query);
}
}

let builder = http::Request::builder()
Expand Down

0 comments on commit 19c190d

Please sign in to comment.