Re: How to use ap_parse_form_data and keep request body?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So, I've been looking into how to do this possibly by dynamically enabling the KeptBodySize. I can't seem to use this directive directly in my config because the URLs I am working with get ProxyPass'ed to a different backend, and do not correspond to any `Directory` element, as KeptBodySize only appears to be applicable to Directory contexts...

The following seems like it should work:

static my_request_insert_filter(request_rec *req) {
   if (is_login_request(req)) {
       request_dir_conf *conf = ap_get_module_config(req->per_dir_config,
           &request_module);

       conf->keep_body = 8192;
       conf->keep_body_set = TRUE;

       apr_OFN_ap_request_insert_filter_t(req);
   }
}


However, the linker fails on "unresolved external symbol request_module". Is this the right way to do about doing things? Is there a way to lookup request_module dynamically rather than a reference to it at compile time? 

Help appreciated. Thanks.



On Thu, Jul 31, 2014 at 9:21 PM, Matt Hauck <matthauck@xxxxxxxxx> wrote:
I am developing a module for apache that performs some authentication before passing requests off to the backend. Some of this authentication at times requires parsing form data. The problem is that ap_parse_form_data appears to exhaust the request body, so that by the time it passes my module and gets to the ProxyPass directive which funnels it off to the backend, the request body is gone and the backend thinks there is no form data supplied.

Is there any way to use ap_parse_form_data in such a way that it keeps the request body intact?

Thanks.

(PS. I asked this question on stackoverflow first, then decide to ask it here as well since apache-module questions did not seem to be very well represented on stackoverflow...)

--
Matt



--
Matt

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux