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
getMultiPartFormParameters()
always returns EmptyMultivaluedMap
after upgrade to Resteasy Reactive
#24986
Comments
I think the problem is that the method is a PUT. Doing some tests a POST is working for me. And I think the reason for this behavior is in the KeycloakHandlerChainCustomizer. If it's a POST it's forcing the addition of the @xgp I suppose you can force the parsing adding any @pedroigor FYI. Maybe we need to also add the parser for other methods if the consumes expects the correct media type? |
@rmartinc Thanks for pointing to where it actually happens, and the workaround. I can confirm that the workaround works. |
@rmartinc You are correct. We should handle the body and support multi-part data when handling those missing HTTP methods. |
FTR, we only had |
@xgp Thanks. Please, send the PR if you have time to work on it. Otherwise, let me know. |
@xgp if you are interested you can send a PR, but maybe also check |
PR #25093 |
@xgp Thanks, again! |
Before reporting an issue
Area
core
Describe the bug
In
RealmResourceProvider
extensions that usesession.getContext().getHttpRequest().getMultiPartFormParameters()
to retrieve parts of amultipart/form-data
request, the method now always returns anEmptyMultivaluedMap
instead of the parts of the request.Version
23.0.0
Expected behavior
This should return a
MultivaluedMap
with the parts represented in the request when given a validmultipart/form-data
request. This worked properly in <23.Actual behavior
It always returns an
EmptyMultivaluedMap
.How to Reproduce?
Create a
RealmResourceProvider
extension that returns the followingObject
for thegetResource()
method:Make any
multipart/form-data
request to it (doesn't matter what's in it, as long as it's valid). The resource method outputs:Anything else?
There is a more complete example you can run in an existing extension and see the result in the unit test.
Pull the
xgp/23
branch https://github.com/p2-inc/keycloak-themes/tree/xgp/23Run:
mvn clean install -Dtest=EmailsResourceTest#testGetUpdateTemplateMaster
The text was updated successfully, but these errors were encountered: