You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Graham Leggett <mi...@sharp.fm> on 2001/11/18 11:09:11 UTC

Re: cvs commit: httpd-2.0/modules/proxy proxy_http.c

ianh@apache.org wrote:

>        p_conn->close += ap_proxy_liststr(apr_table_get(r->headers_in,
>                                                         "Connection"), "close");
>   +    /* sub-requests never use keepalives */
>   +    if (r->main) {
>   +        p_conn->close++;
>   +    }
>   +

Just checking - does this apply a connection: close to the subrequest,
or the main request? (It should apply it to the subrequest only, and
leave the main request alone).

>   +        /* for sub-requests, ignore freshness/expiry headers */
>   +        if (r->main) {
>   +                if (headers_in[counter].key == NULL || headers_in[counter].val == NULL
>   +                     || !apr_strnatcasecmp(headers_in[counter].key, "Cache-Control")
>   +                     || !apr_strnatcasecmp(headers_in[counter].key, "If-Modified-Since")
>   +                     || !apr_strnatcasecmp(headers_in[counter].key, "If-None-Match")) {
>   +                    continue;
>   +                }
>   +        }

The stripping of conditional headers makes sense, but it is incomplete -
you should be ignoring If-Unmodified-Since, If-Match and If-Range
(remembering these headers from memory, check against RFC2616).

Why are you stripping Cache-Control? The same cache-control conditions
would be valid for the subrequest as for the main request - the
cache-control conditions should be preserved.

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."

Re: cvs commit: httpd-2.0/modules/proxy proxy_http.c

Posted by Ian Holsman <ia...@cnet.com>.
Graham Leggett wrote:

> ianh@apache.org wrote:
> 
> 
>>       p_conn->close += ap_proxy_liststr(apr_table_get(r->headers_in,
>>                                                        "Connection"),
>>
> "close");
> 
>>  +    /* sub-requests never use keepalives */
>>  +    if (r->main) {
>>  +        p_conn->close++;
>>  +    }
>>  +
>>
> 
> Just checking - does this apply a connection: close to the subrequest,
> or the main request? (It should apply it to the subrequest only, and
> leave the main request alone).


just to the subrequest.


> 
> 
>>  +        /* for sub-requests, ignore freshness/expiry headers */
>>  +        if (r->main) {
>>  +                if (headers_in[counter].key == NULL ||
>>
> headers_in[counter].val == NULL
> 
>>  +                     || !apr_strnatcasecmp(headers_in[counter].key,
>>
> "Cache-Control")
> 
>>  +                     || !apr_strnatcasecmp(headers_in[counter].key,
>>
> "If-Modified-Since")
> 
>>  +                     || !apr_strnatcasecmp(headers_in[counter].key,
>>
> "If-None-Match")) {
> 
>>  +                    continue;
>>  +                }
>>  +        }
>>
> 
> The stripping of conditional headers makes sense, but it is incomplete -
> you should be ignoring If-Unmodified-Since, If-Match and If-Range
> (remembering these headers from memory, check against RFC2616).
> 

will do


> Why are you stripping Cache-Control? The same cache-control conditions
> would be valid for the subrequest as for the main request - the
> cache-control conditions should be preserved.


Oh.. Ok..
I'll get rid of that

> 
> Regards,
> Graham
>