Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: request.getUri should respond include path and query values #1853

Merged
merged 6 commits into from
Aug 29, 2023

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Aug 29, 2023

see: #1848

I added the same test to the core TCK I have added a test in the TCK micronaut-projects/micronaut-core#9791

@sdelamo sdelamo changed the title request.getUri should respond queryvalues fix: request.getUri should respond include path and query values Aug 29, 2023
@sdelamo
Copy link
Contributor Author

sdelamo commented Aug 29, 2023

@timyates can you fix this. see approach: #1849

@timyates timyates added this to the 4.0.3 milestone Aug 29, 2023
@@ -55,7 +55,11 @@ public APIGatewayV2HTTPEventServletRequest(
super(
conversionService,
requestEvent,
URI.create(requestEvent.getRequestContext().getHttp().getPath()),
ApiGatewayServletRequest.buildUri(
requestEvent.getRequestContext().getHttp().getPath(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use rawPath and rawQuery ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the advantage of using rawPath and rawQuery? 🤔

Copy link
Contributor

@driverpt driverpt Aug 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to parse and treat it

https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html

You can just join it, e.g.: ${path}?${query}

@sonarcloud
Copy link

sonarcloud bot commented Aug 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@timyates timyates marked this pull request as ready for review August 29, 2023 10:43
@sdelamo sdelamo merged commit 270ed7f into master Aug 29, 2023
9 checks passed
@sdelamo sdelamo deleted the issue-1849 branch August 29, 2023 11:07
@sdelamo sdelamo mentioned this pull request Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants