[ 
https://issues.apache.org/jira/browse/WINK-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12727538#action_12727538
 ] 

Nick Gallardo commented on WINK-35:
-----------------------------------

Nadav,

I see what you're saying.  The only reason I can come up with for someone 
wanting the whole entity AND individual form params would be to do logging of 
some sort.

That said, it is an edge case.  I'll have to go back and look at the binding 
providers, but I'm wondering if we can even support a broader type given that 
you can only drain the inbound stream once.  


> 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.

Reply via email to