Re: Bug in HTTP when proxying

Stipe Tolj <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization Wapme Systems AG
Message-ID <[email protected]>
Michael Mulcahy wrote:
> 
> Hi All,
> 
> There is a bug in HTTP module when connections are proxied and
> the connection is persistent.
> 
> The host:port key of the target server is put into the connection pool
> rather than the host:port key of the proxy.
> 
> The proxy connection never gets reused as the conn_pool_get call is passed
> the host and port of the proxy and that is never in the pool.
> 
> Here is a fix for this issue:
> 
> 967c967,972
> <         conn_pool_put(trans->conn, trans->host, trans->port);
> ---
> >     {
> >         if (trans->proxying)
> >             conn_pool_put(trans->conn, proxy_hostname, proxy_port) ;
> >         else
> >             conn_pool_put(trans->conn, trans->host, trans->port);
> >     }
> 
> comments!

I'm not quite sure. A quick look from me uncovers this in
gwlib/http.c:1171:get_connection():


    if (proxy_used_for_host(trans->host)) {
        host = proxy_hostname;
        port = proxy_port;
    } else {
        host = trans->host;
        port = trans->port;
    }

doesn't it get handled by it?!

Stipe

[email protected]
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: [email protected]
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.