remm        02/02/27 20:24:21

  Modified:    catalina/src/share/org/apache/catalina/connector/http Tag:
                        tomcat_40_branch HttpProcessor.java
  Log:
  - Port fix.
  - Fix bug 6668.
  - If no port is specified, the default port for the service is assumed. Note: This
    can break broken clients, as it forces them to specify the port in the host header.
  - Patch submitted by Craig Setera <craig.setera at kingland.com>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.36.2.4  +9 -4      
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
  retrieving revision 1.36.2.3
  retrieving revision 1.36.2.4
  diff -u -r1.36.2.3 -r1.36.2.4
  --- HttpProcessor.java        21 Feb 2002 01:57:30 -0000      1.36.2.3
  +++ HttpProcessor.java        28 Feb 2002 04:24:21 -0000      1.36.2.4
  @@ -1,6 +1,6 @@
  -/* * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.36.2.3 2002/02/21 01:57:30 remm Exp $
  - * $Revision: 1.36.2.3 $
  - * $Date: 2002/02/21 01:57:30 $
  +/* * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
 1.36.2.4 2002/02/28 04:24:21 remm Exp $
  + * $Revision: 1.36.2.4 $
  + * $Date: 2002/02/28 04:24:21 $
    *
    * ====================================================================
    *
  @@ -106,7 +106,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.36.2.3 $ $Date: 2002/02/21 01:57:30 $
  + * @version $Revision: 1.36.2.4 $ $Date: 2002/02/28 04:24:21 $
    */
   
   final class HttpProcessor
  @@ -624,6 +624,11 @@
               } else if (header.equals(DefaultHeaders.HOST_NAME)) {
                   int n = value.indexOf(':');
                   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
  
  
  

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

Reply via email to