On Wed, 2002-09-11 at 07:40, Kris Verbeeck wrote:
> Hi,
> 
> Attached is a patch that will solve the 304 turning into 200 response code
> problem.  It seems that in mod_disk_cache the status line was also saved
> and restored from the cache.  On a first request it is saved as "200 OK" or
> something to the cache file.  On subsequent requests it is restored into
> r->status_line.


If the read of this field is removed, won't we also need to remove
the code that writes it?

-Brian

> --- mod_disk_cache.c  Wed Sep 11 16:33:25 2002
> +++ mod_disk_cache.c-PATCHED  Wed Sep 11 16:32:54 2002
> @@ -484,6 +484,17 @@
>  
>      r->status = atoi(urlbuff);                           /* Save status line into 
>request rec  */
>  
> +    rv = apr_file_gets(&urlbuff[0], urllen, dobj->hfd);               /* Read 
>status line */
> +    if (rv != APR_SUCCESS) {
> +        /* XXX log message */
> +     return rv;
> +    }
> +
> +    if ((temp = strchr(&urlbuff[0], '\n')) != NULL)       /* trim off new line 
>character */
> +     *temp = '\0';              /* overlay it with the null terminator */
> +
> +    r->status_line = apr_pstrdup(r->pool, urlbuff);            /* Save status line 
>into request rec  */
> +
>      h->req_hdrs = apr_table_make(r->pool, 20);
>      
>      /*



Reply via email to