chuck       96/12/09 20:16:46

  Modified:    src/modules/proxy  proxy_http.c
  Log:
  Further testing reveals the fetch of Host header is totally bogus in this
  context. b2 as released is OK, since this condition was always NULL for
  Host:.
  
  Revision  Changes    Path
  1.9       +13 -16    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.8
  retrieving revision 1.9
  diff -C3 -r1.8 -r1.9
  *** proxy_http.c      1996/12/10 03:12:05     1.8
  --- proxy_http.c      1996/12/10 04:16:44     1.9
  ***************
  *** 166,188 ****
    
    /* 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;
  !     p = strchr(url, '/');
  !     if (p == NULL)
  !     {
  !         desthost = pstrdup(pool, url);
  !         url = "/";
  !     } else
  !     {
  !         char *q = palloc(pool, p-url+1);
  !         memcpy(q, url, p-url);
  !         q[p-url] = '\0';
  !         url = p;
  !         desthost = q;
  !     }
        }
    
        p = strchr(desthost, ':');
  --- 166,185 ----
    
    /* We break the URL into host, port, path-search */
    
  !     url += 7;  /* skip http:// */
  !     destport = DEFAULT_PORT;
  !     p = strchr(url, '/');
  !     if (p == NULL)
        {
  !         desthost = pstrdup(pool, url);
  !         url = "/";
  !     } else
  !     {
  !         char *q = palloc(pool, p-url+1);
  !         memcpy(q, url, p-url);
  !         q[p-url] = '\0';
  !         url = p;
  !         desthost = q;
        }
    
        p = strchr(desthost, ':');
  
  
  

Reply via email to