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

Lior Harel commented on WINK-251:
---------------------------------

wow ! so quick.. I wanted to ask you to fix it myself. I'll be able to
verify it on Sunday so I'll let you know.
Thanks




> Handling http error 405 correctly 
> ----------------------------------
>
>                 Key: WINK-251
>                 URL: https://issues.apache.org/jira/browse/WINK-251
>             Project: Wink
>          Issue Type: Bug
>          Components: Common
>            Reporter: Lior Harel
>            Assignee: Bryant Luk
>             Fix For: 1.1
>
>
> I am having troubles handling wrong method calls. When calling a resource 
> with an inappropriate method (e.g. POST instead of GET), wink identifies the 
> resource doesn't support the requested method, and generates a 
> WebApplicationException with status code 405. (so far so good :-) )
> For some reason the http error code 405 is not part of the Status class 
> (enum), so calling valueOf doesn't generate the appropriate Status object 
> instance. I guess that's not a wink issue, as it is not part of the 
> javax.ws.rs spec either.
>  The HTP spec says that when returning 405 error, the server also MUST set 
> the Allow header. 
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6
> But the problem is setting the Allow header, when I handle the exception in 
> my custom ExceptionMapper class, and the exception has 405 status, I can't 
> easily tell what are the allowed methods for the requested resource.

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