Google Groups Home
Help | Sign in
Message from discussion Request body of PUT with no Content-Type is processed incorrectly by CP3 (CP2 does it right)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Chris Miles  
View profile
 More options Feb 20, 3:41 am
From: Chris Miles <miles.ch...@gmail.com>
Date: Wed, 20 Feb 2008 19:41:06 +1100
Local: Wed, Feb 20 2008 3:41 am
Subject: Re: [cherrypy-devel] Re: Request body of PUT with no Content-Type is processed incorrectly by CP3 (CP2 does it right)

On 20/02/2008, at 6:54 AM, Sylvain Hellegouarch wrote:

>> Sounds good to me. RFC 2616 says:

>>   Any HTTP/1.1 message containing an entity-body SHOULD include a
>>   Content-Type header field defining the media type of that body. If
>>   and only if the media type is not given by a Content-Type field,  
>> the
>>   recipient MAY attempt to guess the media type via inspection of its
>>   content and/or the name extension(s) of the URI used to identify  
>> the
>>   resource. If the media type remains unknown, the recipient SHOULD
>>   treat it as type "application/octet-stream".

>> ...which I read as: let the app decide since we don't want to get  
>> into
>> sniffing.

> Indeed. However Chris, note that in the IETF language, a SHOULD is a
> very strong requirement. They seldom use MUST but SHOULD means "we  
> know
> there are some cases where it won't be suitable but those should be  
> rare
> enough". I would invite you Chris to get the habit of sending the
> content-type (you could actually hit some intermediairies that would  
> get
> you into trouble as well without that header).

Good point Sylvain.  We actually encourage our clients to define a  
Content-Type, but we also make sure we handle cases where they leave  
it out.

Cheers,
Chris Miles


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google