From: "Robert Brewer" <fuman...@aminus.org>
Date: Tue, 19 Feb 2008 10:52:06 -0800
Local: Tues, Feb 19 2008 1:52 pm
Subject: RE: [cherrypy-devel] Request body of PUT with no Content-Type is processed incorrectly by CP3 (CP2 does it right)
Chris Miles wrote: Sounds good to me. RFC 2616 says: > I'm porting a CP2 app to CP3 (3.1.0beta3) and have an issue with CP3 > Request.process_body() attempting to parse params from the request > body of a PUT request with no "Content-Type" header defined, which > wasn't how CP2 behaved in the same situation. > Given this super simple CP3 test app: > If I create a PUT request to /upload, with no "Content-Type" header > If I create a PUT request with any "Content-Type" (besides > If I create a PUT request with "Content-Type: application/x-www-form- > Here's some examples of the above behaviour using curl (error > $ curl --header "Content-Type: foo/bar" --upload-file ~/tmp/foo.tmp > $ curl --header "Content-Type: application/x-www-form-urlencoded" -- > I'd like to see the behaviour changed back to only attempting to parse > 1. Request.body_params__doc (and Request.body__doc) indicate that this > 2. The request body should be left alone unless the Content-Type > 3. This is how it worked in CP2. > In the case of my application, I don't want to force my users to Any HTTP/1.1 message containing an entity-body SHOULD include a ...which I read as: let the app decide since we don't want to get into > If this is reasonable, I'm happy to create a ticket (and possibly a Please do! :) > patch) for CP3. Robert Brewer 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.
| ||||||||||||||