diff -r1.38.2.4 htcp.c 324a325,327 > case HTCP_CLR: > // nothing to be done > break; 609a613,643 > htcpClrReply(htcpDataHeader * dhdr, StoreEntry * e, htcpSpecifier * spec, struct sockaddr_in *from) > { > htcpStuff stuff; > char *pkt; > ssize_t pktlen; > > if (e) { > if (e->mem_obj) { > debug(31, 3) ("htcpClrReply: Releasing Store for %s\n", e->mem_obj->url); > } else { > debug(31, 3) ("htcpClrReply: Releasing Store for entry\n"); > } > storeRelease(e); > } > memset(&stuff, '\0', sizeof(stuff)); > stuff.op = HTCP_CLR; > stuff.rr = RR_RESPONSE; > stuff.f1 = 0; > stuff.response = e ? 0 : 2; > debug(31, 3) ("htcpClrReply: response = %d\n", stuff.response); > stuff.msg_id = dhdr->msg_id; > pkt = htcpBuildPacket(&stuff, &pktlen); > if (pkt == NULL) { > debug(31, 0) ("htcpClrReply: htcpBuildPacket() failed\n"); > return; > } > htcpSend(pkt, (int) pktlen, from); > xfree(pkt); > } > > static void 743a778,815 > htcpHandleClr(htcpDataHeader * hdr, char *buf, int sz, struct sockaddr_in *from) > { > /* buf[0/1] is reserved and reason */ > int reason = buf[1] << 4; > debug(31, 3) ("htcpHandleClr: reason=%d\n", reason); > buf += 2; > sz -= 2; > > /* buf should be a SPECIFIER */ > htcpSpecifier *s; > StoreEntry *e; > if (sz == 0) { > debug(31, 3) ("htcpHandleClr: nothing to do\n"); > return; > } > if (hdr->F1 == 0) > return; > s = htcpUnpackSpecifier(buf, sz); > if (NULL == s) { > debug(31, 3) ("htcpHandleClr: htcpUnpackSpecifier failed\n"); > return; > } > debug(31, 3) ("htcpHandleClr: %s %s %s\n", > s->method, > s->uri, > s->version); > debug(31, 3) ("htcpHandleClr: %s\n", s->req_hdrs); > if ((e = htcpCheckHit(s, 0))) { > debug(31, 9) ("htcpHandleClr: Hit and remove\n"); > htcpClrReply(hdr, e, s, from); /* hit */ > } else { > debug(31, 9) ("htcpHandleClr: Nothing found\n"); > htcpClrReply(hdr, NULL, NULL, from); /* cache miss */ > } > htcpFreeSpecifier(s); > } > > static void 795,796c867 < debug(31, 1) ("htcpHandleData: client %s, CLR not supported\n", < inet_ntoa(from->sin_addr)); --- > htcpHandleClr(&hdr, buf, sz, from);