allan juul wrote:
hi stas
Stas Bekman wrote:
allan juul wrote:
[...]
But if you use a mod_perl filter you will still hit the issue of
unknown content-length header.
yes, of course that's true.
there goes caching (:
Not really. Nothing prevents you from buffering up the response,
process it, set the content-length header and make the document
cache-able.
ok, eh how do i that. you mean instead of printing to STDOUT, collect
data in a buffer, then set the calculated Content-Length, then print data?
That's right.
anyway, it's pretty strange. it seems i'm able to set the Content-Length
when i use the mod_perl_filter and do *not* reverse proxy. see both
headers below. the strange things is that i'm not allowed at all to set
the standard Content-Length, but indeed allowed to set a custom one
called Content-Length2. and even stranger is that this custom header
presents a correct value when *not* proxying but "0" when proxying. i
use the exact same mod_perl code, also supplied below. the actual
filtering of data content works in both cases.
Use must use $r->set_content_length(). See the mp2 test suite for examples.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com