deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH 2/2] CIMI - collections use grab_content_type helper to guess type if not supplied
Date Wed, 05 Dec 2012 00:45:20 GMT
On Tue, 2012-12-04 at 14:23 +0200, marios@redhat.com wrote:
> From: marios <marios@redhat.com>
> 
> 
> Signed-off-by: marios <marios@redhat.com>
> ---
>  server/lib/cimi/collections/addresses.rb         |  2 +-
>  server/lib/cimi/collections/credentials.rb       |  2 +-
>  server/lib/cimi/collections/machine_templates.rb |  2 +-
>  server/lib/cimi/collections/machines.rb          | 10 +++++-----
>  server/lib/cimi/collections/network_ports.rb     |  6 +++---
>  server/lib/cimi/collections/networks.rb          |  8 ++++----
>  6 files changed, 15 insertions(+), 15 deletions(-)

I think what grab_content_type is doing is overly lenient - we should
reject requests that have a content-type other than application/xml or
application/json with a 415. Note that the comparison of the
Content-Type header with the above two values must be case-insensitive.

David



Mime
View raw message