Skip Menu |

This queue is for tickets about the mod_perl CPAN distribution.

Report information
The Basics
Id: 82409
Status: resolved
Priority: 0/
Queue: mod_perl

People
Owner: Nobody in particular
Requestors: zefram [...] fysh.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: pipelined response deadlock
Date: Fri, 4 Jan 2013 16:27:07 +0000
To: bug-mod_perl [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
There's a race condition that can cause mod_perl's test suite to hang in t/filter/in_str_declined.t. The problem is that the response handler starts generating response body, and so triggers header output, before it reads the request body. If LWP::Protocol::http, which is the client for this test, receives a complete set of response headers, it will stop sending the request body. (However, if the request body is no more than 8192 octets then it will send the whole body before it starts looking for a response. The failure only shows up with an appreciably large request body.) RFC 2616 doesn't explicitly address this sort of pipelining, but the start of section 6 does say "After receiving and interpreting a request message, a server responds with an HTTP response message.", which can be read as prohibiting sending any part of the response before the entire request has been received. The attached patch fixes this issue by making all the POST handlers in the test suite read the body before doing anything that generates output (specifically plan()). -zefram

Message body is not shown because sender requested not to inline it.

Thanks for the patch, which has (very) belatedly come to my attention. This is now committed in rev. 1867454 and will be in the forthcoming mod_perl-2.0.11.