On Wed, 9 Jan 2002, Rodent of Unusual Size wrote:

> HTTPD PROXY STATUS:
> Last modified at [$Date: 2001/10/05 08:57:18 $]
>
> Release:
>
> intended for 1.3/2.0 release date
>
> httpd 1.3.x)
>
>    Source for HTTP/1.1 mod_proxy is now available
>     in httpd-proxy/module-1.0/ via CVS
>    Note: this code now maintains binary compatibility
>
>    CVS snapshots of HTTP/1.1 proxy + apache 1.3-current are at
>     http://cvs.apache.org/builds/httpd-proxy/
>

Re intended merge of this code with 1.3.x, note that -Wall compilation produces
an error in proxy_cache.c, in the function ap_proxy_cache_conditional. The
problem is that wetag is used without initialization in the case etag is NULL.

The if statement

836:    else if (wetag && ap_proxy_liststr(c->inm, wetag, NULL)) {

should perhaps be changed to

836:    else if (etag && wetag && ap_proxy_liststr(c->inm, wetag, NULL)) {

Another approach is to initialize wetag to NULL in its declaration

728:    const char *etag, *wetag = NULL;

Yet another approach is to set it to NULL if etag is NULL

730:    /* get etag */
731:    if ((etag = ap_table_get(c->hdrs, "Etag"))) {
732:        wetag = ap_pstrcat(r->pool, "W/", etag, NULL);
733:    } else wetag = NULL;

If nothing is done, the results are unexpected. I.e., this is not a matter of
mere cosmetics, but a real bug. I regret I didn't send this in before, but
since it seems apache 1.3.x with the new proxy will actually be used before
2.0.x is in production, I think it should be clean.

Sincerely,

Zvi.

-- 
Dr. Zvi Har'El     mailto:[EMAIL PROTECTED]     Department of Mathematics
tel:+972-54-227607                   Technion - Israel Institute of Technology
fax:+972-4-8324654 http://www.math.technion.ac.il/~rl/     Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)
                             Thursday, 26 Tevet 5762, 10 January 2002,  2:31PM

Reply via email to