On Wed, 14 Jan 2004, Henrik Nordstrom wrote:
> Thinking... OK, I think I know what the bug is in that patch.
Confirmed. The logics on what keep-alive headers are impossible was a
little too broad, sometimes triggering on fully valid HTTP/1.0 replies.
The patch has been corrected, and attached to this message you can find
the incremental patch if you are using the snapshot release or otherwise
can't easily get/apply the updated patch.
Regards
Henrik
Index: src/http.c
===================================================================
RCS file: /server/cvs-server/squid/squid/src/http.c,v
retrieving revision 1.384.2.10
diff -u -p -r1.384.2.10 http.c
--- src/http.c 12 Jan 2004 10:51:59 -0000 1.384.2.10
+++ src/http.c 14 Jan 2004 18:34:53 -0000
@@ -476,7 +476,7 @@ httpProcessReplyHeader(HttpStateData * h
if (reply->keep_alive) {
if (httpState->peer)
httpState->peer->stats.n_keepalives_recv++;
- if (reply->content_length == -1) {
+ if (httpReplyBodySize(httpState->request->method, reply) == -1) {
debug(11, 1) ("httpProcessReplyHeader: Impossible keep-alive header from
'%s'\n", storeUrl(entry));
httpState->flags.keepalive_broken = 1;
}
Index: src/structs.h
===================================================================
RCS file: /server/cvs-server/squid/squid/src/structs.h,v
retrieving revision 1.408.2.19
diff -u -p -r1.408.2.19 structs.h
--- src/structs.h 12 Jan 2004 10:51:59 -0000 1.408.2.19
+++ src/structs.h 14 Jan 2004 18:34:53 -0000
@@ -964,11 +964,11 @@ struct _HttpReply {
};
struct _http_state_flags {
- unsigned int keepalive_broken:1;
- unsigned int abuse_detected:1;
unsigned int proxying:1;
unsigned int keepalive:1;
unsigned int only_if_cached:1;
+ unsigned int keepalive_broken:1;
+ unsigned int abuse_detected:1;
};
struct _HttpStateData {