dgaudet     98/03/04 02:58:09

  Modified:    src      CHANGES
               src/modules/proxy proxy_http.c
  Log:
  ProxyPass didn't deal with query strings because the ?args part is
  already truncated in that case.
  
  Joel's patch worked for subrequests (i.e. via #include virtual)... I fixed
  it to deal with all requests... and I couldn't help but clean up some crufty
  code in proxy_http_canon().
  
  Submitted by: Joel Truher <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.682     +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.681
  retrieving revision 1.682
  diff -u -r1.681 -r1.682
  --- CHANGES   1998/03/04 08:37:05     1.681
  +++ CHANGES   1998/03/04 10:58:06     1.682
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b6
   
  +  *) When using ProxyPass the ?querystring was not passed correctly.
  +     [Joel Truher <[EMAIL PROTECTED]>]
  +
     *) To deal with modules being compiled and [dynamically] linked
        at a different time from the core, the SERVER_VERSION and
        SERVER_BUILT symbols have been abstracted through the new
  
  
  
  1.41      +8 -16     apache-1.3/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- proxy_http.c      1998/02/27 15:15:26     1.40
  +++ proxy_http.c      1998/03/04 10:58:09     1.41
  @@ -67,7 +67,7 @@
    */
   int proxy_http_canon(request_rec *r, char *url, const char *scheme, int 
def_port)
   {
  -    char *host, *path, *search, *p, sport[7];
  +    char *host, *path, *search, sport[7];
       const char *err;
       int port;
   
  @@ -81,29 +81,21 @@
   
   /* now parse path/search args, according to rfc1738 */
   /* N.B. if this isn't a true proxy request, then the URL _path_
  - * has already been decoded
  + * has already been decoded.  True proxy requests have r->uri
  + * == r->unparsed_uri, and no others have that property.
    */
  -    if (r->proxyreq) {
  -     p = strchr(url, '?');
  -     if (p != NULL)
  -         *(p++) = '\0';
  +    if (r->uri == r->unparsed_uri) {
  +     search = strchr(url, '?');
  +     if (search != NULL)
  +         *(search++) = '\0';
       }
       else
  -     p = r->args;
  +     search = r->args;
   
   /* process path */
       path = proxy_canonenc(r->pool, url, strlen(url), enc_path, r->proxyreq);
       if (path == NULL)
        return HTTP_BAD_REQUEST;
  -
  -/* process search */
  -    if (p != NULL) {
  -     search = p;
  -     if (search == NULL)
  -         return HTTP_BAD_REQUEST;
  -    }
  -    else
  -     search = NULL;
   
       if (port != def_port)
        ap_snprintf(sport, sizeof(sport), ":%d", port);
  
  
  

Reply via email to