André,

On 15.5.2013 15:38, André Warnier wrote:
As far as I understand here, we are not talking about a proxy situation,
we are talking about Iptables, which does not proxy, it just modifies
packets.
So the URL that Tomcat gets from the 1st request line does not contain a
hostname[:port}.

According to RFC2616 (Section 5.1.2), client may send absolute URI or absolute path. Majority of clients will send absolute path when talking to the server.


But yes, the Host header will contain a port, if different from the
default 80.

Right.


So is that where Tomcat picks it up here, despite receiving the request
on the (different) port of the Connector ?

Yes. You may take a look at AbstractHttp11Processor.parseHost(MessageBytes). If the host header is not set (e.g. client uses HTTP 1.0), Tomcat will set port to the one read from endpoint configuration. If the client uses HTTP 1.1, where host header is mandatory, Tomcat will read host header. If there is a port specified in the value of the host header it will be read. If there is no port specified in the host header that Tomcat will assume port 80 for HTTP and port 443 for HTTPS.


Or is there just something not clear about the OP's configuration ?

I have no explanation why the OP is using iptables prerouting inversly of what is their common usage with Tomcat.

-Ognjen

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

Reply via email to