incorrect response for DELETE /v2/tasks/{task_id}

Bug #1287951 reported by Nikhil Komawar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Nikhil Komawar

Bug Description

A call to DELETE /v2/tasks/{task_id} for an existing task_id returns a 404 (which is obviously incorrect because a GET on the same URL returns a task detail response).

The response should be 405 (Method Not Allowed). From the spec:
"The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. The response MUST include an Allow header containing a list of valid methods for the requested resource."

Note that an Allow header must be included in the response.

Revision history for this message
Nikhil Komawar (nikhil-komawar) wrote :
Changed in glance:
assignee: nobody → nikhil komawar (nikhil-komawar)
status: New → In Progress
Alex Meade (alex-meade)
Changed in glance:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/78050
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=1367fa214d2aedf86bee82b983d9fa7f41928a95
Submitter: Jenkins
Branch: master

commit 1367fa214d2aedf86bee82b983d9fa7f41928a95
Author: Nikhil Komawar <email address hidden>
Date: Tue Mar 4 19:34:31 2014 -0500

    Return 405 when attempting DELETE on /tasks

    We currently return 404 NotFound when attempting to delete a task
    by hitting the resource /v2/tasks/{task_id}. However, as this
    resource exists and we do not allow DELETE on tasks, the correct
    response is 405 MethodNotAllowed.

    Implementing as per spec on
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

    Fixes bug 1287951

    Change-Id: Ia4a969e595b520dbc5f4e9a463d967681465ae6f

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → icehouse-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-rc1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.