The fix is to not set r->sent_bodyct in ap_send_http_header() if r->header_only is set. Here is the patch:
Index: http_protocol.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
retrieving revision 1.335
diff -u -r1.335 http_protocol.c
--- http_protocol.c 15 Apr 2004 15:51:51 -0000 1.335
+++ http_protocol.c 1 Jul 2004 02:46:08 -0000
@@ -1887,7 +1887,9 @@
ap_kill_timeout(r); ap_bsetopt(r->connection->client, BO_BYTECT, &zero);
- r->sent_bodyct = 1; /* Whatever follows is real body stuff... */
+ if (!r->header_only) {
+ r->sent_bodyct = 1; /* Whatever follows is real body stuff... */
+ } /* Set buffer flags for the body */
if (r->chunked)
Will this break anyone?
Bill
