Hi,

I am currently using squid 2.5.STABLE9.  I noticed that if my request has the 
"if-modified-since" header, server's 302 response becomes no longer cacheable.  
However, if I take out that header, the 302 response becomes cacheable again.  
However, if the response is 200 instead of 302, even with "if-modified-since" 
header, the response is still cacheable.  I can't find anywhere in the specs 
specifying the above behavior.  Also, I notice the code is doing it 
intentionally (only 200 is cacheable).  Am I missing something?

    /*
     * Handle If-Modified-Since requests from the client
     */
    if (mem->reply->sline.status != HTTP_OK) {
        debug(33, 4) ("clientCacheHit: Reply code %d != 200\n",
        mem->reply->sline.status);
        memFree(buf, MEM_CLIENT_SOCK_BUF);
        http->log_type = LOG_TCP_MISS;
        clientProcessMiss(http);
    }

I would like to find a way to cache those 302 response even if the requests 
have "if-modified-since" header.  Any suggestion?

Thanks,

--Chris

Reply via email to