[mod_python] Proxy + Tomcat filter problems

Radosław Rymaszewski rrymaszewski at contentforces.pl
Thu Apr 17 06:20:10 EDT 2008


Hello

I was trying to find out solution for my problem but there were no answers,
so I decided to write here.

We are using mod_python filters for our system

Infrastructure description:

INTERNET <---> APACHE 2.8.3 with mod_python 3.3.1 + output filters <-->
Apache proxy module <--> TOMCAT 5.5.2x

our filters concat chunked content from tomcat and write to client whole
changed content. It's important for us to get whole response from tomcat and
after it process.

problem is when filter.read() reach last byte (filter.read() == None) then
there is no possibility to overwrite request headers.

There is no such problem during reading content and when we serve static
pages from apache www server.

mod_python receive such headers

1 chunk

[Wed Apr 16 05:52:15 2008] [error] {'Via': '1.1 domain', 'Set-Cookie':
'JSESSIONID=sessionXXX; Path=/path', 'Date': 'Fri, 18 Apr 2008 19:47:06
GMT', 'Cache-Control': 'no-store', 'Cache-Control': 'no-cache', 'Expires':
'Thu, 01 Jan 1970 00:00:00 GMT', 'Pragma': 'No-cache', 'Server':
'Apache-Coyote'}

2 chunk

[Wed Apr 16 05:52:15 2008] [error] {'Content-Type': 'text/plain',
'Transfer-Encoding': 'chunked', 'Connection': 'Keep-Alive', 'Keep-Alive':
'timeout=15, max=100', 'Via': '1.1 domain', 'Set-Cookie':
'JSESSIONID=sessionXXX; Path=/path', 'Cache-Control': 'No-cache', 'Expires':
'0', 'Pragma': 'No-cache'}

3 chunk

[Wed Apr 16 05:52:15 2008] [error] {'Content-Type': 'text/plain',
'Transfer-Encoding': 'chunked', 'Connection': 'Keep-Alive', 'Keep-Alive':
'timeout=15, max=100', 'Via': '1.1 domain', 'Set-Cookie':
'JSESSIONID=sessionXXX; Path=/path', 'Cache-Control': 'No-cache', 'Expires':
'0', 'Pragma': 'No-cache'}

when I finish process on first or second chunk I can modify headers without
any problems. after third one there is no such possibility

Do You know what could be wrong ?

-- 
Radosław Rymaszewski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20080417/66e3a9fa/attachment.html


More information about the Mod_python mailing list