You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Jesse Ramos (JIRA)" <ji...@apache.org> on 2009/07/02 17:23:49 UTC

[jira] Updated: (WINK-35) Entity lost when using application/x-www-form-urlencoded media type and FormParam

     [ https://issues.apache.org/jira/browse/WINK-35?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Ramos updated WINK-35:
----------------------------

    Attachment: diff.txt

Attaching a possible fix and additional unit tests.

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