DO NOT REPLY [Bug 11748] - Location header for redirection does not contain the port number

2005-03-19 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=11748.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=11748


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 OS/Version||All
 Resolution||INVALID




--- Additional Comments From [EMAIL PROTECTED]  2005-03-19 18:59 ---
The standard approach of the Tomcat team is not to introduce code to Tomact that
is effectively a work-around for a broken client. This makes the report INVALID.

Also, this connector is now deprecated which if this was a valid bug would make
this a WONTFIX.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 11748] - Location header for redirection does not contain the port number

2004-09-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=11748.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=11748

Location header for redirection does not contain the port number

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2004-09-10 11:54 ---
there is an actual bug here. In HttpProcessor, when the Host: header has no port
(eg because the client is buggy as described above) the code does this:
if (n  0) {
  if (connector.getScheme().equals(http)) {
 request.setServerPort(80);
  } else if (connector.getScheme().equals(https)) {
 request.setServerPort(443);
  }
  if (proxyName != null)
 request.setServerName(proxyName);
  else
 request.setServerName(value);
}
note that in the above only the proxyName is processed, not the proxyPort. In
other words, if you explicitly tell tomcat to ignore the host header and use
proxy host/port combo, it doesnt in this case, it only uses the host.

the code for host header handling *should* look like this:
} else if (header.equals(DefaultHeaders.HOST_NAME)) {
int n = value.indexOf(':');
// parse and apply host header
if (n  0) {
if (connector.getScheme().equals(http)) {
request.setServerPort(80);
} else if (connector.getScheme().equals(https)) {
request.setServerPort(443);
}
request.setServerName(value);
} else {
request.setServerName(value.substring(0, n).trim());
int port = 80;
try {
   port = Integer.parseInt(value.substring(n+1).trim());
} catch (Exception e) {
   throw new ServletException
(sm.getString
(httpProcessor.parseHeaders.portNumber));
}
request.setServerPort(port);
}

// apply proxy overrides
if (proxyName != null)
   request.setServerName(proxyName);
if (proxyPort != 0)
   request.setServerPort(proxyPort);
} ...

the intent here is that any proxy host/port settings are always applied.

We reproduced the problem following a link from Word 2000, linking to tomcat via
the axis tcpmon proxy. linking to any content that returns a redirect shows the
problem (eg http://host:port/foo; redirects to http://host:port/foo/;) Word
sends a host header without the port, obviously a bug, but tomcat's response
ignores the proxy settings due to the bug described above.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 11748] - Location header for redirection does not contain the port number

2002-08-15 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11748.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11748

Location header for redirection does not contain the port number

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2002-08-15 21:58 ---
The bug is in the client program.  It is not sending the port in the Host 
header, so Tomcat is assuming that the connection is on the default port.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]