httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@hyperreal.org>
Subject cvs commit: apachen/src/modules/proxy proxy_http.c
Date Mon, 18 Aug 1997 06:53:22 GMT
dgaudet     97/08/17 23:53:21

  Modified:    src      CHANGES
               src/modules/proxy proxy_http.c
  Log:
  The request to a remote proxy was mangled if it was generated as the
  result of a ProxyPass directive. URL schemes other than http:// were not
  supported when ProxyRemote was used. PR#260, PR#656, PR#699, PR#713,
  PR#812 [Lars Eilebrecht]
  
  PR:		260, 656, 699, 713, 812
  Submitted by:	Lars Eilebrecht
  Reviewed by:	Dean Gaudet, Ralf S. Engelschall
  
  Revision  Changes    Path
  1.401     +5 -0      apachen/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.400
  retrieving revision 1.401
  diff -u -r1.400 -r1.401
  --- CHANGES	1997/08/17 15:33:06	1.400
  +++ CHANGES	1997/08/18 06:53:18	1.401
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3a2
   
  +  *) The request to a remote proxy was mangled if it was generated as the
  +     result of a ProxyPass directive. URL schemes other than http:// were not
  +     supported when ProxyRemote was used. PR#260, PR#656, PR#699, PR#713,
  +     PR#812 [Lars Eilebrecht]
  +
     *) PORT: Apache has need for mutexes to serialize its children around
        accept.  In prior versions either fcntl file locking or flock file
        locking were used.  The method is chosen by the definition of
  
  
  
  1.27      +11 -9     apachen/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- proxy_http.c	1997/08/15 17:59:52	1.26
  +++ proxy_http.c	1997/08/18 06:53:20	1.27
  @@ -156,6 +156,7 @@
       const long int zero=0L;
       int destport = 0;
       char *destportstr = NULL;
  +    char *urlptr = NULL;
   
       void *sconf = r->server->module_config;
       proxy_server_conf *conf =
  @@ -169,19 +170,21 @@
   
   /* We break the URL into host, port, path-search */
   
  -    url += 7;  /* skip http:// */
  +    urlptr = strstr(url,"://");
  +    if (urlptr == NULL) return BAD_REQUEST;
  +    urlptr += 3;
       destport = DEFAULT_PORT;
  -    p = strchr(url, '/');
  +    p = strchr(urlptr, '/');
       if (p == NULL)
       {
  -        desthost = pstrdup(pool, url);
  -        url = "/";
  +        desthost = pstrdup(pool, urlptr);
  +        urlptr = "/";
       } else
       {
  -        char *q = palloc(pool, p-url+1);
  -        memcpy(q, url, p-url);
  -        q[p-url] = '\0';
  -        url = p;
  +        char *q = palloc(pool, p-urlptr+1);
  +        memcpy(q, urlptr, p-urlptr);
  +        q[p-urlptr] = '\0';
  +        urlptr = p;
           desthost = q;
       }
   
  @@ -207,7 +210,6 @@
   
       if (proxyhost != NULL)
       {
  -	url = r->uri;			/* restore original URL */
   	server.sin_port = htons(proxyport);
   	err = proxy_host2addr(proxyhost, &server_hp);
   	if (err != NULL) return DECLINED;  /* try another */
  
  
  

Mime
View raw message