-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Make sure query params are correct when set from ContainerRequestFilter #49065
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
Conversation
geoand
commented
Jul 23, 2025
- Fixes: UriInfo.getRequestUri loses query parameters if ContainerRequestContext.setRequestUri is called #49064
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fail to spot where the test actually tests the query parameters :-/
|
Status for workflow
|
builder.replacePath("/hello"); | ||
UriInfo originalUriInfo = requestContext.getUriInfo(); | ||
UriBuilder builder = originalUriInfo.getRequestUriBuilder(); | ||
builder.replacePath(originalUriInfo.getPath().contains("2") ? "/hello/2" : "/hello"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH OK I see. I was thinking it's replacePath
that we need to check, thinking this is where the original reporter added a path that included query parameters that we dropped.
But in fact we're using the builder to build a URI, which includes query parameters, and then later down we call setRequestUri
with query param (that was the original bug).
I got confused, this is fine, thanks :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌