Comment 0 for bug 1504646

Revision history for this message
Christopher Solis (cnsolis) wrote : Unable to return secret payload with content type application/octet-stream

When doing a curl request for retrieving a secret with the content-type 'application/octet-stream'. No problem arises.

(Barbican)christopher@christopher-VirtualBox:~/openrcs$ curl -H 'X-Auth-Token:fa43522258df4aa0896fb8cf71e26a4d' -H 'Accept:application/octet-stream' http://localhost:9311/v1/secrets/871b6f51-4198-40e1-ab1e-5c226af7d3e4

�m��m��m�(Barbican)christopher@christopher-VirtualBox:~/openrcs$

With the barbicanclient however, an error arises.

(Barbican)christopher@christopher-VirtualBox:~/openrcs$ barbican secret get -p -t 'application/octet-stream' http://localhost:9311/v1/secrets/871b6f51-4198-40e1-ab1e-5c226af7d3e4
Starting new HTTP connection (1): localhost
Starting new HTTP connection (1): localhost
'utf8' codec can't decode byte 0xd7 in position 0: invalid continuation byte

The barbican server doesn't show an error when retrieving the secret so it looks like a client-side error.
It looks like even thought encoding is in 'application/octet-stream' it is trying to use the utf-8 character set.