httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject cvs commit: apache-1.3/src/main http_vhost.c
Date Tue, 23 Jan 2001 14:14:07 GMT
fanf        01/01/23 06:14:07

  Modified:    src      CHANGES
               src/main http_vhost.c
  Log:
  Fix the handling of port numbers in Host headers.
  Spotted by:     coar
  
  Revision  Changes    Path
  1.1623    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1622
  retrieving revision 1.1623
  diff -u -u -r1.1622 -r1.1623
  --- CHANGES	2001/01/21 03:10:10	1.1622
  +++ CHANGES	2001/01/23 14:14:04	1.1623
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.17
   
  +  *) Handle port numbers in Host headers properly again after
  +     the code was broken in 1.3.15. [Tony Finch]
  +
   Changes with Apache 1.3.16
   
     *) None from 1.3.15
  
  
  
  1.25      +12 -8     apache-1.3/src/main/http_vhost.c
  
  Index: http_vhost.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_vhost.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -u -r1.24 -r1.25
  --- http_vhost.c	2001/01/15 17:05:03	1.24
  +++ http_vhost.c	2001/01/23 14:14:06	1.25
  @@ -717,15 +717,19 @@
   	if (*src == '/' || *src == '\\') {
   	    goto bad;
   	}
  +        if (*src == ':') {
  +            /* check the port part */
  +            while (*++src) {
  +                if (!ap_isdigit(*src)) {
  +                    goto bad;
  +                }
  +            }
  +            if (src[-1] == ':')
  +                goto bad;
  +            else
  +                break;
  +        }
   	*dst++ = *src++;
  -    }
  -    /* check the port part */
  -    if (*src++ == ':') {
  -	while (*src) {
  -	    if (!ap_isdigit(*src++)) {
  -		goto bad;
  -	    }
  -	}
       }
       /* strip trailing gubbins */
       if (dst > host && dst[-1] == '.') {
  
  
  

Mime
View raw message