406 response when Accept header is application/json on DELETE requests

Bug #1326481 reported by Meera Belur
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Medium
John Vrbanac

Bug Description

DELETE on the secret resource responding with a 406 when Accept header is application/json

 curl -i -v http://localhost:9311/v1/905c7f8b0040416592a79288ecf8d4fc/secrets/a3e5eb75-9865-4376-a278-131d7a2af28b -XDELETE -H "X-Auth-Token:aa923c1ba51846fa838193a7d3b0ca53" -H "Accept: application/json"
* Adding handle: conn: 0xb56c30
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0xb56c30) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 9311 (#0)
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 9311 (#0)
> DELETE /v1/905c7f8b0040416592a79288ecf8d4fc/secrets/a3e5eb75-9865-4376-a278-131d7a2af28b HTTP/1.1
> User-Agent: curl/7.32.0
> Host: localhost:9311
> X-Auth-Token:aa923c1ba51846fa838193a7d3b0ca53
> Accept: application/json
>
< HTTP/1.1 406 Not Acceptable
HTTP/1.1 406 Not Acceptable
< Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8
< Content-Length: 61
Content-Length: 61

<
* Connection #0 to host localhost left intact
{"code": 406, "description": null, "title": "Not Acceptable"}

This is seen after the pecan integration.

Changed in barbican:
assignee: nobody → Arvind Tiwari (arvind-tiwari)
John Wood (john-wood-w)
Changed in barbican:
milestone: none → juno-2
Revision history for this message
Arvind Tiwari (arvind-tiwari) wrote :

This is just not true for secret but applicable to all resources.

Changed in barbican:
status: New → In Progress
summary: - DELETE on the secret resource responding with a 406 when Accept header
- is application/json
+ 406 response when Accept header is application/json on DELETE requests
Revision history for this message
Arvind Tiwari (arvind-tiwari) wrote :

This issue is happing because Pecan only allow "text/html" in Accept header for DELETE requests.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (master)

Fix proposed to branch: master
Review: https://review.openstack.org/99967

Changed in barbican:
importance: Undecided → Medium
Changed in barbican:
milestone: juno-2 → juno-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on barbican (master)

Change abandoned by Arvind Tiwari (<email address hidden>) on branch: master
Review: https://review.openstack.org/99967

Changed in barbican:
assignee: Arvind Tiwari (arvind-tiwari) → nobody
milestone: juno-3 → juno-rc1
Changed in barbican:
assignee: nobody → John Vrbanac (john.vrbanac)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to barbican (master)

Fix proposed to branch: master
Review: https://review.openstack.org/124555

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Reviewed: https://review.openstack.org/124555
Committed: https://git.openstack.org/cgit/openstack/barbican/commit/?id=8d98d25e34c5360c98bd8dc30bc1ab993bca65ca
Submitter: Jenkins
Branch: master

commit 8d98d25e34c5360c98bd8dc30bc1ab993bca65ca
Author: John Vrbanac <email address hidden>
Date: Fri Sep 26 20:06:49 2014 -0500

    Allowing all content-types for secret delete

    Fixing issue where a secret delete fails if the Accept header
    is set to application/json.

    Change-Id: Ia60ec76805e7a820578f202ffa06c31579a084db
    Closes-Bug: #1326481

Changed in barbican:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in barbican:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in barbican:
milestone: juno-rc1 → 2014.2
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.