-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
type: enhancementNew feature or requestNew feature or request
Description
Expected Behavior
@FormParam should not be transposed to @QueryValue in a multipart endpoint.
@Path("widgets4")
public class WidgetsResource4 {
@POST
@Consumes(MediaType.MULTIPART_FORM_DATA)
public Response postWidget(@FormParam("part1Name") String part1,
@FormParam("part2Name") InputStream part2,
@FormParam("part3Name") EntityPart part3) {...}
}
@FormParam represents a part of a Multipart request, not a QueryValue. But, here, the code is translating it to @QueryValue - this is wrong and will break HTTP clients.
Actual Behaviour
The above snippet should work correctly, with the @FormParam values being interpreted as part of the multipart form, not as query parameters.
Steps To Reproduce
- Write a JAX-RS controller which uses
@FormParamto indicate multipart form data - Test, it will break
Environment Information
No response
Example Application
I cannot provide a sample application right now as this was noticed in an enterprise setting.
Version
4.4.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: enhancementNew feature or requestNew feature or request