Bug 319759 (MONO76947) - Patch: HttpWorkerRequest.ReadEntityBody() returns 0 for chunked requests under mod_mono
Summary: Patch: HttpWorkerRequest.ReadEntityBody() returns 0 for chunked requests unde...
Status: RESOLVED FIXED
Alias: MONO76947
Product: Mono: Tools
Classification: Mono
Component: mod_mono (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Gonzalo Paniagua Javier
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2005-12-08 21:42 UTC by Dean Brettle
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Patch to support chunked requests (364 bytes, patch)
2005-12-08 22:45 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:40:45 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".