You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by John Corrigan <jo...@johncorrigan.net> on 2003/04/28 19:59:37 UTC

Proxied requests having header data prepended.

Requests to servlets being handled by Tomcat through an Apache 1.3.26 server
get header data added to the beginning of the output.  Is this a bug or a
configuration problem?  Is there a workaround?  Any ideas?

Setup:

Proxy machine:
  Debian woody 3.0r1
  Apache 1.3.26

  relevent snippet from http.conf

	<VirtualHost *:80>
		ServerName lead.cli.voyager.xxxxxxxx.net
		DocumentRoot /shared/Development/Clients/EnPassant/WebSite/current/Webroot
		<IfModule mod_rewrite.c>
			RewriteEngine On
			RewriteLog "/var/log/apache/lead.cli.rewrite.log"
			RewriteLogLevel 1
			RewriteRule ^/(.*) http://lead.cli.voyager.internal.net/$1 [P]
		</IfModule>
	</VirtualHost>

Tomcat machine:
  Windows 2000
  Apache 1.3.27 or 2.0.44
  mod_jk/1.2.2-beta-1
  Tomcat 4.1.18

Added output:
	Date: Mon, 28 Apr 2003 17:25:18 GMT
	Server: Apache/2.0.44 (Win32) mod_jk/1.2.2-beta-1
	Set-Cookie: JSESSIONID=CAD02E1DE8AD71FFD2DB181FF05A5F6A; Path=/examples
	Content-Length: 1347
	Content-Type: text/html; charset=ISO-8859-1
	X-Cache: MISS from lead.cli.voyager.xxxxxxxx.net
	Keep-Alive: timeout=15, max=100
	Connection: Keep-Alive

Other notes:

Static pages and other (non servlet) applications do not seem to have any
problem being proxied to in this manner so I think that it is probably a
Tomcat or mod_jk issue.


Any help greatly appreciated,

John


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


RE: Proxied requests having header data prepended.

Posted by John Corrigan <jo...@johncorrigan.net>.
I'm using ProxyPass to get to a machine behind a firewall.  The "header
data" is not sent as headers, but is sent as content which is not only
annoying but seems to break cookies.  Upgrading the proxying server to
2.0.45 seems to have fixed things.  Apparantly there have been some other
unresolved ProxyPass issues in the Debian 1.3.x tree.  I thought it likely
to be a Tomcat issue since I don't have the problem with requests not being
passed on to Tomcat.

Thanks anyway.



-----Original Message-----
From: news [mailto:news@main.gmane.org]On Behalf Of Bill Barker
Sent: Tuesday, April 29, 2003 12:59 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: Proxied requests having header data prepended.


Urm, err, first I would need to know what the problem is :).

Under the HTTP/1.1 spec, proxies are free to add new headers to the
response.  You are getting the standard mod_proxy headers added, for the
simple reason that you requested (via mod_rewite) that mod_proxy handle the
request.

Assuming that you can open port 8009 on your firewall, it is possible to do
all of this with mod_jk, and leave mod_proxy out of the picture all
together.

"John Corrigan" <jo...@johncorrigan.net> wrote in message
news:BJEKJKPFPBAAJKKBLOENOEDPCIAA.john@johncorrigan.net...
> Requests to servlets being handled by Tomcat through an Apache 1.3.26
server
> get header data added to the beginning of the output.  Is this a bug or a
> configuration problem?  Is there a workaround?  Any ideas?
>
> Setup:
>
> Proxy machine:
>   Debian woody 3.0r1
>   Apache 1.3.26
>
>   relevent snippet from http.conf
>
> <VirtualHost *:80>
> ServerName lead.cli.voyager.xxxxxxxx.net
> DocumentRoot /shared/Development/Clients/EnPassant/WebSite/current/Webroot
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteLog "/var/log/apache/lead.cli.rewrite.log"
> RewriteLogLevel 1
> RewriteRule ^/(.*) http://lead.cli.voyager.internal.net/$1 [P]
> </IfModule>
> </VirtualHost>
>
> Tomcat machine:
>   Windows 2000
>   Apache 1.3.27 or 2.0.44
>   mod_jk/1.2.2-beta-1
>   Tomcat 4.1.18
>
> Added output:
> Date: Mon, 28 Apr 2003 17:25:18 GMT
> Server: Apache/2.0.44 (Win32) mod_jk/1.2.2-beta-1
> Set-Cookie: JSESSIONID=CAD02E1DE8AD71FFD2DB181FF05A5F6A; Path=/examples
> Content-Length: 1347
> Content-Type: text/html; charset=ISO-8859-1
> X-Cache: MISS from lead.cli.voyager.xxxxxxxx.net
> Keep-Alive: timeout=15, max=100
> Connection: Keep-Alive
>
> Other notes:
>
> Static pages and other (non servlet) applications do not seem to have any
> problem being proxied to in this manner so I think that it is probably a
> Tomcat or mod_jk issue.
>
>
> Any help greatly appreciated,
>
> John




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



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


Re: Proxied requests having header data prepended.

Posted by Bill Barker <wb...@wilshire.com>.
Urm, err, first I would need to know what the problem is :).

Under the HTTP/1.1 spec, proxies are free to add new headers to the
response.  You are getting the standard mod_proxy headers added, for the
simple reason that you requested (via mod_rewite) that mod_proxy handle the
request.

Assuming that you can open port 8009 on your firewall, it is possible to do
all of this with mod_jk, and leave mod_proxy out of the picture all
together.

"John Corrigan" <jo...@johncorrigan.net> wrote in message
news:BJEKJKPFPBAAJKKBLOENOEDPCIAA.john@johncorrigan.net...
> Requests to servlets being handled by Tomcat through an Apache 1.3.26
server
> get header data added to the beginning of the output.  Is this a bug or a
> configuration problem?  Is there a workaround?  Any ideas?
>
> Setup:
>
> Proxy machine:
>   Debian woody 3.0r1
>   Apache 1.3.26
>
>   relevent snippet from http.conf
>
> <VirtualHost *:80>
> ServerName lead.cli.voyager.xxxxxxxx.net
> DocumentRoot /shared/Development/Clients/EnPassant/WebSite/current/Webroot
> <IfModule mod_rewrite.c>
> RewriteEngine On
> RewriteLog "/var/log/apache/lead.cli.rewrite.log"
> RewriteLogLevel 1
> RewriteRule ^/(.*) http://lead.cli.voyager.internal.net/$1 [P]
> </IfModule>
> </VirtualHost>
>
> Tomcat machine:
>   Windows 2000
>   Apache 1.3.27 or 2.0.44
>   mod_jk/1.2.2-beta-1
>   Tomcat 4.1.18
>
> Added output:
> Date: Mon, 28 Apr 2003 17:25:18 GMT
> Server: Apache/2.0.44 (Win32) mod_jk/1.2.2-beta-1
> Set-Cookie: JSESSIONID=CAD02E1DE8AD71FFD2DB181FF05A5F6A; Path=/examples
> Content-Length: 1347
> Content-Type: text/html; charset=ISO-8859-1
> X-Cache: MISS from lead.cli.voyager.xxxxxxxx.net
> Keep-Alive: timeout=15, max=100
> Connection: Keep-Alive
>
> Other notes:
>
> Static pages and other (non servlet) applications do not seem to have any
> problem being proxied to in this manner so I think that it is probably a
> Tomcat or mod_jk issue.
>
>
> Any help greatly appreciated,
>
> John




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