Re: [mod-security-users] Modifying output buffers "on the fly"
Brought to you by:
victorhora,
zimmerletw
|
From: Ivan R. <iv...@we...> - 2005-07-04 07:50:08
|
Daniel Fdez. Bleda wrote: > Hello, > > I'm trying to modify the content of the buffer send to the user during > the sec_filter_out() function after having in the context the > output_ptr and sizelen of data. > > I've done it but when I write in the new allocated out_ptr using the > apr_palloc function and write the new value in len field the user > receives the HTML with the old length, so the page is not complete. > > I'm doing this, at first stage, to strip comment code in HTML (libxml2 > adds some tabs, spaces and rets that make HTML occupy more space, but > more readable) and later to have signatures to http request to the > site in the HTML to avoid alterations in que request to the server. That's probably because there's an old Content-Length header present. Try to remove it from r->headers_out as you change the output. -- Ivan Ristic Apache Security (O'Reilly) - http://www.apachesecurity.net Open source web application firewall - http://www.modsecurity.org |