You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1997/08/21 01:54:52 UTC

grr. bug in 1.2.3 proxy

Grr.  The 1.2.3 proxy is deadly broken, ie. it sets "GET http://host/path
HTTP/1.0" requests to origin servers instead of just "GET /path HTTP/1.0".

Index: proxy_http.c
===================================================================
RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_http.c,v
retrieving revision 1.17.2.3
diff -c -r1.17.2.3 proxy_http.c
*** proxy_http.c	1997/08/17 21:00:48	1.17.2.3
--- proxy_http.c	1997/08/20 23:52:25
***************
*** 250,256 ****
      bpushfd(f, sock, sock);
  
      hard_timeout ("proxy send", r);
!     bvputs(f, r->method, " ", url, " HTTP/1.0\015\012", NULL);
      bvputs(f, "Host: ", desthost, NULL);
      if (destportstr != NULL && destport != DEFAULT_PORT)
  	bvputs(f, ":", destportstr, "\015\012", NULL);
--- 250,256 ----
      bpushfd(f, sock, sock);
  
      hard_timeout ("proxy send", r);
!     bvputs(f, r->method, " ", urlptr, " HTTP/1.0\015\012", NULL);
      bvputs(f, "Host: ", desthost, NULL);
      if (destportstr != NULL && destport != DEFAULT_PORT)
  	bvputs(f, ":", destportstr, "\015\012", NULL);


Re: grr. bug in 1.2.3 proxy

Posted by Marc Slemko <ma...@worldgate.com>.
So, what do we want to do?

I will put up a bit note on the web site after I eat if no one beats me to
it; the sooner the better, before too many download it.

Do we want to do 1.2.4 right away or work something else out?

On Wed, 20 Aug 1997, Marc Slemko wrote:

> Grr.  The 1.2.3 proxy is deadly broken, ie. it sets "GET http://host/path
> HTTP/1.0" requests to origin servers instead of just "GET /path HTTP/1.0".
> 
> Index: proxy_http.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_http.c,v
> retrieving revision 1.17.2.3
> diff -c -r1.17.2.3 proxy_http.c
> *** proxy_http.c	1997/08/17 21:00:48	1.17.2.3
> --- proxy_http.c	1997/08/20 23:52:25
> ***************
> *** 250,256 ****
>       bpushfd(f, sock, sock);
>   
>       hard_timeout ("proxy send", r);
> !     bvputs(f, r->method, " ", url, " HTTP/1.0\015\012", NULL);
>       bvputs(f, "Host: ", desthost, NULL);
>       if (destportstr != NULL && destport != DEFAULT_PORT)
>   	bvputs(f, ":", destportstr, "\015\012", NULL);
> --- 250,256 ----
>       bpushfd(f, sock, sock);
>   
>       hard_timeout ("proxy send", r);
> !     bvputs(f, r->method, " ", urlptr, " HTTP/1.0\015\012", NULL);
>       bvputs(f, "Host: ", desthost, NULL);
>       if (destportstr != NULL && destport != DEFAULT_PORT)
>   	bvputs(f, ":", destportstr, "\015\012", NULL);
> 


RE: grr. bug in 1.2.3 proxy

Posted by Lars Eilebrecht <La...@unix-ag.org>.
According to Marc Slemko:

>  Grr.  The 1.2.3 proxy is deadly broken, ie. it sets "GET http://host/path
>  HTTP/1.0" requests to origin servers instead of just "GET /path HTTP/1.0".

*argh* You can shoot me...
I introduced this bug with my ProxyRemote patch... :-(

I tested the patch with _no_ ProxyRemote set, but only with an Apache
as a destination server which seems to handle the requests. *sigh*

As Ken already pointed out, your patch breaks ProxyRemote again.
If mod_proxy is going to make a request to a remote proxy "url"
should be used in the request, it it's going to make a direct
request to a webserver "urlptr" should be used.


sorry...
--
Lars Eilebrecht                       - It is impossible to make anything
sfx@unix-ag.org                  - foolproof, because fools are so ingenious.
http://www.si.unix-ag.org/~sfx/