httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Thu, 08 Nov 2001 12:34:21 GMT
martin      01/11/08 04:34:21

  Modified:    .        CHANGES
               server   core.c
  Log:
  When no port is given in a "ServerName host" directive, the
  server_rec->port is now set to zero, not 80. That allows for
  run-time deduction of the correct server port (depending on
  SSL/plain, and depending also on the current setting of
  UseCanonicalName). This change makes redirections
  work, even with https:// connections. [Martin Kraemer]
  
  Revision  Changes    Path
  1.420     +7 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.419
  retrieving revision 1.420
  diff -u -r1.419 -r1.420
  --- CHANGES	2001/11/07 19:29:10	1.419
  +++ CHANGES	2001/11/08 12:34:20	1.420
  @@ -1,5 +1,12 @@
   Changes with Apache 2.0.28-dev
   
  +  *) When no port is given in a "ServerName host" directive, the
  +     server_rec->port is now set to zero, not 80. That allows for
  +     run-time deduction of the correct server port (depending on
  +     SSL/plain, and depending also on the current setting of
  +     UseCanonicalName). This change makes redirections
  +     work, even with https:// connections. [Martin Kraemer]
  +
     *) Add a '%{note-name}e' argument to mod-headers, which works in
        the same way as mod_log_confg.  [Ian Holsman]
   
  
  
  
  1.87      +7 -7      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- core.c	2001/11/02 15:17:06	1.86
  +++ core.c	2001/11/08 12:34:21	1.87
  @@ -756,7 +756,7 @@
   
       if (d->use_canonical_name == USE_CANONICAL_NAME_OFF
   	|| d->use_canonical_name == USE_CANONICAL_NAME_DNS) {
  -        if (r->hostname) {
  +        if (r->connection && r->connection->client_socket) {
               apr_sockaddr_t *localsa;
   
               apr_socket_addr_get(&localsa, APR_LOCAL, r->connection->client_socket);
  @@ -1633,15 +1633,15 @@
                                                       portstr - arg);
           portstr++;
           port = atoi(portstr);
  +        if (port <= 0 || port >= 65536) { /* 65536 == 1<<16 */
  +            return apr_pstrcat(cmd->temp_pool, "The port number \"", arg, 
  +			  "\" is outside the appropriate range "
  +			  "(i.e., 1..65535).", NULL);
  +        }
       }
       else {
           cmd->server->server_hostname = apr_pstrdup(cmd->pool, arg);
  -        port = 80;
  -    }
  -    if (port <= 0 || port >= 65536) { /* 65536 == 1<<16 */
  -	return apr_pstrcat(cmd->temp_pool, "The port number \"", arg, 
  -			  "\" is outside the appropriate range "
  -			  "(i.e., 1..65535).", NULL);
  +        port = 0;
       }
       cmd->server->port = port;
       return NULL;
  
  
  

Mime
View raw message