William Siqueira created GTNMGMT-61:
---------------------------------------
Summary: REST API should return 405 for some not allowed methods
Key: GTNMGMT-61
URL:
https://issues.jboss.org/browse/GTNMGMT-61
Project: GateIn Management
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Components: rest
Reporter: William Siqueira
Assignee: Nick Scavelli
Priority: Minor
When trying to perform POST, PUT or DELETE on a method that doesn't update the
resource, the API returns the resource representation instead returning 405.
Taking as example the following URL:
http://localhost:8080/rest/private/managed-components/mop/portalsites/cla...
I can retrieve it using curl and it's expected:
$ curl --user root:admin -H 'Content-Type: application/xml' -X GET
http://localhost:8080/rest/private/managed-components/mop/portalsites/cla...
The problem is that when I try to POST, PUT or DELETE, it keeps returning the
representation in XML:
curl --user root:admin -H 'Content-Type: application/xml' -X DELETE
http://localhost:8080/rest/private/managed-components/mop/portalsites/cla...
It should not happen. I believe that the most suitable response should be 405 - Method Not
Allowed.
--
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