You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Reto Bachmann-Gmür (JIRA)" <ji...@apache.org> on 2013/04/03 20:27:15 UTC

[jira] [Comment Edited] (WINK-379) Server error when accept header too broad

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

Reto Bachmann-Gmür edited comment on WINK-379 at 4/3/13 6:26 PM:
-----------------------------------------------------------------

With this patch the resource method returns EasterEgg and the MBW is for EasterEggs. Furthermore I removed authentication stuff from web.xml as I don't understand it.

The MBW has @produces to text/plain

I try following requests:

{noformat} 
curl -v -H "Accept: text/plain" http://localhost:8080/sample-jaxrs-webapp/services/wink379

--> Getting correct 200 response

curl -v -H "Accept: text/foo" http://localhost:8080/sample-jaxrs-webapp/services/wink379

--> Getting 500 response, should be 406

curl -v -H "Accept: */*" http://localhost:8080/sample-jaxrs-webapp/services/wink379

--> Getting 500 response, should be 200 (as with "Accept: text/plain")

curl -v -H "Accept: text/foo, text/plain;q=0.1" http://localhost:8080/sample-jaxrs-webapp/services/wink379

--> Getting 500 response, should be 200 (as with "Accept: text/plain")

curl -v -H "Accept: text/foo;q=0.5, text/plain;q=1" http://localhost:8080/sample-jaxrs-webapp/services/wink379

--> Getting correct 200 response
{noformat} 
                
      was (Author: reto):
    With this patch the resource method returns EasterEgg and the MBW is for EasterEggs. Furthermore I removed authentication stuff from web.xml as I don't understand it.

The MBW has @produces to text/plain

I try following requests:

curl -v -H "Accept: text/plain" http://localhost:8080/sample-jaxrs-webapp/services/wink379

--> Getting correct 200 response

curl -v -H "Accept: text/foo" http://localhost:8080/sample-jaxrs-webapp/services/wink379

--> Getting 500 response, should be 406

curl -v -H "Accept: */*" http://localhost:8080/sample-jaxrs-webapp/services/wink379

--> Getting 500 response, should be 200 (as with "Accept: text/plain")

curl -v -H "Accept: text/foo, text/plain;q=0.1" http://localhost:8080/sample-jaxrs-webapp/services/wink379

--> Getting 500 response, should be 200 (as with "Accept: text/plain")

curl -v -H "Accept: text/foo;q=0.5, text/plain;q=1" http://localhost:8080/sample-jaxrs-webapp/services/wink379

--> Getting correct 200 response

                  
> Server error when accept header too broad
> -----------------------------------------
>
>                 Key: WINK-379
>                 URL: https://issues.apache.org/jira/browse/WINK-379
>             Project: Wink
>          Issue Type: Bug
>            Reporter: Reto Bachmann-Gmür
>         Attachments: wink-379-sample.patch
>
>
> As posted here: http://mail-archives.apache.org/mod_mbox/wink-user/201301.mbox/%3CCALvhUEXFOBnx-CxswLeauMYDSNBu3OSh3_PVoT55BychL54QaA@mail.gmail.com%3E
> Wink returns a 500 Server error if the accept header fisrt preference doesn't match a message body writer even if a MessageBodyWriter suitable for another accepted format is available.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira