[
https://issues.apache.org/jira/browse/WINK-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727414#action_12727414
]
Nadav Fischer commented on WINK-35:
-----------------------------------
The solution looks ok, but I'm not sure we want to handle this at all. I mean,
this handles only the case where the entity parameter is a MultivaluedMap, but
what about an entity of a different type, such as String? Do we want to go
there?
I think we should keep this as simple as we can instead of complicating the
code to handle such a special case. What do you think?
> Entity lost when using application/x-www-form-urlencoded media type and
> FormParam
> ---------------------------------------------------------------------------------
>
> Key: WINK-35
> URL: https://issues.apache.org/jira/browse/WINK-35
> Project: Wink
> Issue Type: Bug
> Components: Common
> Affects Versions: 0.1
> Reporter: Jesse Ramos
> Priority: Minor
> Attachments: diff.txt
>
>
> When using the application/x-www-form-urlencoded media type, if a resource
> method uses the FormParam annotation for one parameter and specifies an
> entity parameter, the entity parameter value is lost before being injected.
> This is a sample method header:
> @POST
> @Path("withOneKeyAndEntity")
> public String getRes(@FormParam("firstkey") String firstKey,
> MultivaluedMap<String, String> entity)
> When obtaining the value for the FormParam parameter, the entity is read from
> the input stream. When the input stream is later read for the entity
> parameter the entity is no longer on the input stream. The read is done in
> the FormMultivaluedMapProvider entity provider.
> This is an edge case because it's not likely that a user will use the
> FormParam to get the values of form parameters and also get all the
> parameters in the entity MultivaluedMap paramter. However, technically it
> should be supported.
> Will upload a patch.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.