httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <ch...@hyperreal.com>
Subject cvs commit: apache/src/modules/proxy proxy_http.c
Date Tue, 10 Dec 1996 03:12:08 GMT
chuck       96/12/09 19:12:07

  Modified:    src/modules/proxy  proxy_http.c
  Log:
  Reviewed by:	Roy Fielding
  Correct thinko in table_get() arg. Add protection against URLs like
  http://somehost:/foo/bar with an isdigit() test on the char following
  the colon after a hostname.
  
  Revision  Changes    Path
  1.8       +6 -3      apache/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -C3 -r1.7 -r1.8
  *** proxy_http.c	1996/12/09 22:40:17	1.7
  --- proxy_http.c	1996/12/10 03:12:05	1.8
  ***************
  *** 166,172 ****
    
    /* We break the URL into host, port, path-search */
    
  !     if ((desthost = table_get(r->headers_in, "Host:")) == NULL)
        {
    	url += 7;  /* skip http:// */
    	destport = DEFAULT_PORT;
  --- 166,172 ----
    
    /* We break the URL into host, port, path-search */
    
  !     if ((desthost = table_get(r->headers_in, "Host")) == NULL)
        {
    	url += 7;  /* skip http:// */
    	destport = DEFAULT_PORT;
  ***************
  *** 189,196 ****
        if (p != NULL)
        {
            *(p++) = '\0';
  !         destport = atoi(p);
  !         destportstr = p;
        }
    
        if (proxyhost != NULL)
  --- 189,199 ----
        if (p != NULL)
        {
            *(p++) = '\0';
  ! 	if (isdigit(*p))
  ! 	{
  !             destport = atoi(p);
  !             destportstr = p;
  ! 	}
        }
    
        if (proxyhost != NULL)
  
  
  

Mime
View raw message