Input filters that alter content-length

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

 



Hi,

I have the following scenario :

- Apache/2.2.19 (Solaris 10 SPARC)

     SetInputFilter alterxmlbody (AP_FTYPE_RESOURCE)
     SetHandler weblogic-handler


The handler forwards requests to multiple weblogic servers
and the filter itself analyzes and/or changes the POST data
in a way that the length of the incoming request may be changed.

The question is :

What is the proper and legitimate way to deal with this situation?

Should the input filter set the new CL value in "headers_in" before
returning from the callback, or just remove it from the list?


apr_off_t length;
apr_brigade_length     (bb,1,&length);
apr_table_setn(f->r->headers_in, "Content-Length", apr_off_t_toa(f->r->pool, length));

Unfortunately, this approach breaks the pipeline because sometimes
the filter needs to buffer data over more than one call.

or

apr_table_unset(f->r->headers_in, "Content-Length");


Best regards
Ivan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[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