tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivars Strazdiņš <ivars.strazd...@gmail.com>
Subject lost headers in reply from server
Date Fri, 27 Feb 2009 13:30:26 GMT
Hello all,
I use apache reverse proxy connected to two tomcat servers via ajp 
protocol and mod_proxy_balancer . All connections to apache are ssl only.
In a very brief diagram:
[client]  <-- ssl -->  [apache reverse proxy]  <-- (balancer, ajp 
protocol) --> [tomcat1 or tomcat2]

Apache is 2.2.11 on Linux.
Tomcats are 6.0.18 on Windows.
The setup is working, but every now and then (about 1-5%) the client 
instead of a web page is presented with a "save as..." dialog box .
If I save the file, it has the reply in gzipped format.
It appears that the reply to client is send back with crippled headers.
I took a closer look (see below) and the bad one has lost 
Content-Encoding header and Vary has changed, too.
Compression (mod_deflate) is enabled. This saves bandwidth, but the 
problem does not go away.
In the same time switching off compression completely is not an option 
as performance goes down dramatically (clients are behind slow links).
I googled all around but I am not expert in apache configuration. 
Something similar I've seen only here:
http://www1.il.squid-cache.org/mail-archive/squid-users/200712/0206.html

The questions:
1) is my configuration unnecessary complex?
With apache balancer I want to achieve some sort of high availability 
yet keep performance with ajp protocol between apache and tomcat.
2) whom to blame for the pop-up "save" windows - me (apache and tomcat 
configuration), apache, tomcat or, finally - the application?

If anyone can help with suggestions - of course I can provide more 
detailed configuration.
Thanks for you time,
Ivars

NORMAL REPLY.
----------------------------------------------------------
https://192.168.0.2/pers_det.do?formMode=3&id=342119^ 
<https://192.168.0.2/pers_det.do?formMode=3&id=342119>

POST /pers_det.do?formMode=3&id=342119 HTTP/1.1
Host: 192.168.0.2
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) 
Gecko/2009020911 Ubuntu/8.10 (intrepid) Firefox/3.0.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: lv,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://192.168.0.2/goBack.do?back=1^
Cookie: JSESSIONID=50210C8660067165EF0B42E0DD2FFD38.vdeavkprimary
Content-Type: application/x-www-form-urlencoded
Content-Length: 6
back=1
HTTP/1.x 200 OK
Date: Thu, 26 Feb 2009 10:36:06 GMT
Content-Type: text/html;charset=UTF-8
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
----------------------------------------------------------

CRIPPLED REPLY

----------------------------------------------------------

https://192.168.0.2/pers_det.do?formMode=3&id=342119^ 
<https://192.168.0.2/pers_det.do?formMode=3&id=342119>

POST /pers_det.do?formMode=3&id=342119 HTTP/1.1
Host: 192.168.0.2
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) 
Gecko/2009020911 Ubuntu/8.10 (intrepid) Firefox/3.0.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: lv,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://192.168.0.2/goBack.do?back=1^
Cookie: JSESSIONID=50210C8660067165EF0B42E0DD2FFD38.vdeavkprimary
Content-Type: application/x-www-form-urlencoded
Content-Length: 6
back=1
HTTP/1.x 200 OK
Date: Thu, 26 Feb 2009 10:36:12 GMT
Vary: User-Agent
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/plain
----------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message