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

Bryant Luk commented on WINK-172:
---------------------------------

I've gone ahead and changed the toleration for {code}"*"{code} to a 
{code}"*/*"{code} since some JDKs and other clients have an Accept header with 
"*" in it by default and there's no chance to change that code.

On some thought, for changing the "text/" to "text/*" or other invalid accept 
headers, the right response may be a 400 response instead of the current 500 
(or skipping invalid media types).  I'm leaning more towards the 400 instead of 
encouraging bad behavior.

> Improve invalid media type toleration
> -------------------------------------
>
>                 Key: WINK-172
>                 URL: https://issues.apache.org/jira/browse/WINK-172
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 0.2
>            Reporter: Bryant Luk
>            Assignee: Bryant Luk
>             Fix For: 0.2
>
>
> Improve the toleration of invalid media types.  Certain common client code 
> send invalid media type headers.  For those cases, I think it's easier to 
> just skip invalid media types or to "correct" those media types.
> The two I think should be corrected:
> "*" turn to MediaType.WILDCARD
> "text/" (missing subtype) turn to "text/*" (or as appropriate)
> The rest I think should be tolerated as invalid if possible (i.e. skip the 
> invalid media type).

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