Bug #3997
PUT and/or HEAD "object" request ignores content type
Status: | Resolved | Start date: | 06/12/2013 | |
---|---|---|---|---|
Priority: | Medium | Due date: | ||
Assignee: | Sofia Papagiannaki | % Done: | 0% |
|
Category: | Pithos | Spent time: | - | |
Target version: | 0.14.0 |
Description
To reproduce the problem:
To create an object lal
PUT https://mplamplampla/pithos/object-store/v1/myuuid/pithos/lal ... > Content-Type: application/json ... < Content-Type: application/json
... so PUT accepts the 'json' content-type and responds it too.
Now, check the created file
HEAD https://mplamplampla/pithos/object-store/v1/myuuid/pithos/lal2 ... < Content-Type: text/plain; charset=UTF-8
.. so HEAD says the file is not 'json'
To reproduce the problem with kamaki >= 0.9:
kamaki file touch pithos:lal2 --content-type 'aplication/json' -v ... kamaki file info pithos:lal2 -v ...
Associated revisions
pithos: HEAD object request returned erroneous content type
According to commit: b698d39dd6cbe4bf47b63ed0d6a98b9b126ca40e
views defining their response 'Content-Type' should set the
'override_serialization' attribute of response to 'True'.
However, this was missing in the specific view.
Now this code is moved in ``put_object_headers`` that
is used by both HEAD & GET object requests.
Refs: #3997
k
History
#1 Updated by Sofia Papagiannaki almost 10 years ago
- Status changed from New to Resolved