Barbian for secret POST API returns response with content-type text/plain for a BadRequest when Accept Header */*
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Barbican |
Won't Fix
|
Undecided
|
Arun Kant |
Bug Description
Here's a request with empty payload and the return response content-type is text/plain when Accept Header is */*.
Should content-type be application/json?
curl -iv http://<IP>:9311/
* About to connect() to <IP> port 9311 (#0)
* Trying <IP>...
* Adding handle: conn: 0xed4c20
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleT
ine: length: 1
* - Conn 0 (0xed4c20) send_pipe: 1, recv_pipe: 0
* Connected to <IP> (<IP>) port 9311 (#0)
> POST /v1/2104755767d
> User-Agent: curl/7.32.0
> Host: <IP>:9311
> Accept: */*
> X-Auth-
> Content-Length: 215
> Content-Type: application/
>
* upload completely sent off: 215 out of 215 bytes
< HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
< content-length: 108
content-length: 108
< content-type: text/plain
content-type: text/plain
< x-openstack-
x-openstack-
<
{
"title": "Provided object does not match schema 'Secret': If 'payload' specified, must be non empty"
* Connection #0 to host <IP> left intact
}
Here's the request with Accept Header set to application/json
curl -iv http://<IP>:9311/
* About to connect() to <IP> port 9311 (#0)
* Trying <IP>...
* Adding handle: conn: 0x1845c60
* Adding handle: send: 0
* Adding handle: rec
v: 0
* Curl_addHandleT
* - Conn 0 (0x1845c60) send_pipe: 1, recv_pipe: 0
* Connected to <IP> (<IP>) port 9311 (#0)
> POST /v1/2104755767d
> User-Agent: curl/7.32.0
> Host: <IP>:9311
> X-Auth-
> Accept:
> Content-Length: 215
> Content-Type: application/
>
* upload completely sent off: 215 out of 215 bytes
< HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
< content-length: 108
content-length: 108
< content-type: application/json; charset=utf-8
content-type: application/json; charset=utf-8
< x-openstack-
x-openstack-
<
{
"title": "Provided object does not match schema 'Secret': If 'payload' specified, must be non empty"
* Connection #0 to host <IP> left intact
}
Changed in barbican: | |
assignee: | nobody → Arvind Tiwari (arvind-tiwari) |
Changed in barbican: | |
assignee: | Arvind Tiwari (arvind-tiwari) → Arun Kant (arunkant-uws) |
Changed in barbican: | |
milestone: | none → juno-1 |
Changed in barbican: | |
milestone: | juno-1 → juno-2 |
Changed in barbican: | |
status: | In Progress → Won't Fix |
milestone: | juno-2 → none |
Fix proposed to branch: master /review. openstack. org/99423
Review: https:/