Bug #3997

PUT and/or HEAD "object" request ignores content type

Added by Stavros Sachtouris about 11 years ago. Updated almost 11 years ago.

Status:Resolved Start date:06/12/2013
Priority:Medium Due date:
Assignee:Sofia Papagiannaki % Done:


Category:Pithos Spent time: -
Target version:0.14.0


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

Revision 8e95eb05
Added by Sofia Papagiannaki about 11 years ago

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


#1 Updated by Sofia Papagiannaki almost 11 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF