Bugzilla – Bug 319759
Patch: HttpWorkerRequest.ReadEntityBody() returns 0 for chunked requests under mod_mono
Last modified: 2007-09-15 21:24:57 UTC
---- Reported by dean@brettle.com 2005-12-08 14:42:21 MST ---- Description of Problem: For requests that use "chunked" transfer encoding, mod_mono's HttpWorkerRequest.ReadEntityBody() always returns 0. Also, GetKnownRequestHeader(HttpWorkerRequest.HeaderContentLength) returns "0". It should return null because no Content-Length header is sent with a chunked request. Steps to reproduce the problem: 1. Create a simple HttpModule or IHttpHandler that logs the body available via HttpWorkerRequest.ReadEntityBody(). 2. Send a chunked request to the server. For example, you could use something like: curl -X POST -H 'Transfer-Encoding: chunked' --data-binary @test.body http://tempuri.org/path.aspx 3. Examine the logged entity body. Actual Results: The body is empty (ReadEntityBody() returns 0). Expected Results: The body has been decoded. How often does this happen? Everytime. Additional Information: I'm using mod_mono-1.1.10-2 and xsp-1.1.10-1. ---- Additional Comments From dean@brettle.com 2005-12-08 14:47:27 MST ---- BTW, I'm using apache 2.0.53. ---- Additional Comments From dean@brettle.com 2005-12-08 15:45:38 MST ---- Created an attachment (id=168944) Patch to support chunked requests ---- Additional Comments From dean@brettle.com 2005-12-08 15:47:38 MST ---- I've attached a 1-line patch which fixes this. Also, I was wrong about getting "0" for the Content-Length header. I had misread my log file. Sorry for any confusion. ---- Additional Comments From gonzalo@ximian.com 2005-12-08 16:05:17 MST ---- Oh! Nice. I love when people provide a patch and even more if it's just one line. I'll test and check it in asap. ---- Additional Comments From gonzalo@ximian.com 2005-12-08 17:35:10 MST ---- Patch applied. thanks a lot. Imported an attachment (id=168944) Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>FC3</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".