[
https://issues.apache.org/jira/browse/WINK-251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bryant Luk resolved WINK-251.
-----------------------------
Resolution: Fixed
Fix Version/s: 1.1
I went ahead and fixed this last night in revision 903963.
http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/registry/ResourceRegistry.java?r1=827637&r2=903963&pathrev=903963&diff_format=h
Let me know if that works.
> 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.