Index: squid/src/http.c diff -c squid/src/http.c:1.384.2.27 squid/src/http.c:1.384.2.28 *** squid/src/http.c:1.384.2.27 Thu Feb 3 17:30:01 2005 --- squid/src/http.c Fri Feb 11 03:52:59 2005 *************** *** 399,405 **** { StoreEntry *entry = httpState->entry; size_t hdr_len; ! size_t hdr_size = headersEnd(buf, size); HttpReply *reply = entry->mem_obj->reply; Ctx ctx = ctx_enter(entry->mem_obj->url); debug(11, 3) ("httpProcessReplyHeader: key '%s'\n", --- 399,405 ---- { StoreEntry *entry = httpState->entry; size_t hdr_len; ! size_t hdr_size; HttpReply *reply = entry->mem_obj->reply; Ctx ctx = ctx_enter(entry->mem_obj->url); debug(11, 3) ("httpProcessReplyHeader: key '%s'\n", *************** *** 407,416 **** if (memBufIsNull(&httpState->reply_hdr)) memBufDefInit(&httpState->reply_hdr); assert(httpState->reply_hdr_state == 0); ! if (hdr_size) ! memBufAppend(&httpState->reply_hdr, buf, hdr_size); ! else ! memBufAppend(&httpState->reply_hdr, buf, size); hdr_len = httpState->reply_hdr.size; if (hdr_len> 4 && strncmp(httpState->reply_hdr.buf, "HTTP/", 5)) { debug(11, 3) ("httpProcessReplyHeader: Non-HTTP-compliant header: '%s'\n", httpState->reply_hdr.buf); --- 407,413 ---- if (memBufIsNull(&httpState->reply_hdr)) memBufDefInit(&httpState->reply_hdr); assert(httpState->reply_hdr_state == 0); ! memBufAppend(&httpState->reply_hdr, buf, size); hdr_len = httpState->reply_hdr.size; if (hdr_len> 4 && strncmp(httpState->reply_hdr.buf, "HTTP/", 5)) { debug(11, 3) ("httpProcessReplyHeader: Non-HTTP-compliant header: '%s'\n", httpState->reply_hdr.buf); *************** *** 421,428 **** ctx_exit(ctx); return; } ! if (hdr_size != hdr_len) ! hdr_size = headersEnd(httpState->reply_hdr.buf, hdr_len); if (hdr_size) hdr_len = hdr_size; if (hdr_len> Config.maxReplyHeaderSize) { --- 418,424 ---- ctx_exit(ctx); return; } ! hdr_size = headersEnd(httpState->reply_hdr.buf, hdr_len); if (hdr_size) hdr_len = hdr_size; if (hdr_len> Config.maxReplyHeaderSize) {