httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: svn commit: r647263 - in /httpd/httpd/trunk: ./ docs/manual/mod/ include/ modules/aaa/ modules/filters/ modules/http/ server/
Date Fri, 09 May 2008 22:16:54 GMT
Ruediger Pluem wrote:

> Why is this needed? Should this job be performed by the 
> ap_keep_body_filter that should
> be in our input filter chain if we want to keep the body?
> Of course this depends when we call ap_parse_request_form. If we call it 
> during the
> authn/z phase the filter chain hasn't been setup. So maybe we should 
> ensure that
> this is the case.

This opened a can of worms - eventually the solution I found that seemed 
to work well was to create a subrequest to ensure the input filters were 
set up correctly, and then read the input filter stack. The content of 
the input stack is doomed in this case anyway, either it contains our 
login form which must be parsed and discarded, or it doesn't contain our 
login form and should be discarded anyway, as authn will be denied.

If authn was approved, the kept_body filter is put in place to "cap" the 
input filter stack, and either provide an empty body, or provide the 
body that was optionally passed in the form.

Fixed in r654958.

>> +static int request_fixups(request_rec * r)
>> +{
>> +    request_dir_conf *conf = ap_get_module_config(r->per_dir_config,
>> +                                                  &request_module);
>> +
>> +    if (conf->keep_body) {
>> +        ap_add_input_filter_handle(ap_keep_body_input_filter_handle,
>> +                                   NULL, r, r->connection);
>> +    }
>> +
>> +    return OK;
> 
> Why not using the insert_filter hook?

Fixed in r654952.

Regards,
Graham
--


Mime
View raw message