httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Foertsch <>
Subject Re: mod_include supporting POST subrequests
Date Wed, 01 Apr 2009 13:53:54 GMT
On Fri 20 Mar 2009, Graham Leggett wrote:
> Torsten Foertsch wrote:
> > I need the include virtual directive to be able to issue POST
> > requests. It should pass the request body to the subrequest. So I
> > came up with the attached patch.
> >
> > It allows to write
> >
> >   <!--#include method="post" virtual="..." --> or
> >   <!--#include method="inherit" virtual="..." -->
> >
> Something like this has already been added to trunk, take a look at
> the KEEP_BODY and KEPT_BODY filters in modules/filters/mod_request.c.

I did and, frankly, it is not the solution I was looking for. One has to 
define a max. body size to be kept. The body is kept in RAM which can 
be a problem unless KeptBodySize is rather small. So I developed my 
patch further.

It defers now the ap_discard_request_body call as much as possible. This 
gives output filters the chance to read the req body. If the client is 
expecting a "100 Continue" message it is sent just before the first 
line of output.

Is there a chance for the patch to make it into 2.3++? If yes I'll merge 
it with the KEPT_BODY stuff.

Currently my httpd passes the current test framework with a few more 
patches that are not related to this one (see "2.2.11 & mod_include" 
thread) with one exception. Since the request body is read when output 
is potentially already on the wire a HTTP_REQUEST_ENTITY_TOO_LARGE 
error cannot be sent to the client if it sends the request body in 
chunked TE. The only sensible solution that I can think of would be to 
always send a 413 response if TE is chunked and a LimitRequestBody is 

On Fri 20 Mar 2009, Nick Kew wrote:
> Erm ... that's ringing alarm bells.  The client, not the
> server, determines HTTP methods.  Or are you talking about
> proxied subrequests here?

I see it a bit different. Subrequests for included documents are made on 
behalf of the HTML programmer who wrote the frame. He decides to pass 
on the request body and he decides which method to use, IMHO. And yes, 
the problem comes from subrequests that are proxied to another server.


Need professional mod_perl support?
Just hire me:

View raw message