Sorry slight clarification here after rereading httpd source: If you send anything other than that "Continue: 100" interim response to the client, httpd will NOT attempt to read the body, considering it empty. But even if you do send the "Continue: 100", httpd will NOT block the response from being sent until the body has been exhausted. Instead it will send your response as expected, and then finalize the request by calling ap_discard_request_body(r) which WILL exhaust the POST data in order to retain protocol compliance. OTOH I have no idea how browsers deal with the timing issues here, so buyer beware. My point still stands: interrupt the POST prior to sending the Continue, not afterwards.
----- Original Message ----- > From: Joe Schaefer <joe_schae...@yahoo.com> > To: Vincent Veyron <vv.li...@wanadoo.fr>; mike cardeiro <mcarde...@yahoo.com> > Cc: Torsten Förtsch <torsten.foert...@gmx.net>; "modperl@perl.apache.org" > <modperl@perl.apache.org> > Sent: Wednesday, February 8, 2012 4:35 PM > Subject: Re: Interrupting a POST with file upload > > I don't think people groked my point very well. When you POST > via HTTP/1.1, httpd will send a "Continue: 100" header before it > starts doing blocking reads on the client socket (any attempts to > read from the client will trigger this behavior). If you really > want to interrupt an upload, the time to do it is *before* httpd > sends that header. Afterwards httpd commits to reading the entire > request in *before it lets you send a response* in order to maintain > protocol compliance. > > > For reasons that escape me it doesn't look like mod_perl exposes > r->remaining, which is the thing to check when looking at the > pending number of bytes the client wants to send. If I'm not wrong > that should be easy enough for us to address. apreq won't read > anything in in this situation tho, so you're good on that front. > CGI.pm I'd bet doesn't try to read either if the pending data > is too big, but I haven't looked at that codebase in a long time. > > > ----- Original Message ----- >> From: Vincent Veyron <vv.li...@wanadoo.fr> >> To: mike cardeiro <mcarde...@yahoo.com> >> Cc: Torsten Förtsch <torsten.foert...@gmx.net>; > "modperl@perl.apache.org" <modperl@perl.apache.org> >> Sent: Wednesday, February 8, 2012 4:24 PM >> Subject: Re: Interrupting a POST with file upload >> >> Le mercredi 08 février 2012 à 05:53 -0800, mike cardeiro a écrit : >>> This is a fantastic list! >> >> Agreed. >> >> On the same note : I was recently presenting the legal case management >> app in my sig to an institutional client in the south of France, and the >> IT guy said that it had a 'fantastic architecture' (I assume he was >> talking about mod_perl). >> >> -- >> Vincent Veyron >> http://marica.fr/ >> Logiciel de gestion des sinistres et des contentieux pour le service > juridique >> >