diff -uNrw squid-3.2.0.18/src/store.cc squid-3.2.0.18.n/src/store.cc --- squid-3.2.0.18/src/store.cc 2012-07-11 06:06:31.000000000 +0400 +++ squid-3.2.0.18.n/src/store.cc 2012-07-17 18:50:22.746674120 +0400 @@ -748,6 +748,8 @@ /* Create "vary" base object */ String vary; StoreEntry *pe = storeCreateEntry(mem_obj->url, mem_obj->log_url, request->flags, request->method); + /* Create fake store_client to pass all checks */ + store_client *sc = storeClientListAdd(pe, this); /* We are allowed to do this typecast */ HttpReply *rep = new HttpReply; rep->setHeaders(HTTP_OK, "Internal marker object", "x-squid-internal/vary", -1, -1, squid_curtime + 100000); @@ -769,12 +771,20 @@ } #endif - pe->replaceHttpReply(rep); + pe->replaceHttpReply(rep, false); pe->timestampsSet(); pe->makePublic(); + pe->startWriting(); + + /* we don't need the fake client anymore... */ + MemObject *mem = pe->mem_obj; + dlinkDelete(&sc->node, &mem->clients); + mem->nclients--; + delete sc; + pe->complete(); pe->unlock();