httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject 304 and keepalive bug
Date Tue, 28 Jan 1997 20:30:06 GMT
On Tue, 28 Jan 1997, Dean Gaudet wrote:
> I've discovered what looks like a bug elsewhere -- when we send
> back a 304 we also send a Connection: close (presumably because
> there's no Content-Length).  So when netscape is verifying a page like
> <http://www.arctic.org/~dgaudet/all-icons> it has to open a connection
> for each GET If-Modified-Since.  Protocol cops?

I tried with the patch below included and navigator was able to do
keepalive properly on 304 responses.  So this is definately an apache bug.
I'm not sure of the correct solution, that set_keepalive if() statement is
a monster mess.

Incidentally, the difference on the wire is a difference of 744 packets
versus 211.

Dean

Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.93
diff -c -3 -r1.93 http_protocol.c
*** http_protocol.c	1997/01/26 01:15:13	1.93
--- http_protocol.c	1997/01/28 20:26:02
***************
*** 216,222 ****
      else if (r->server->keep_alive && (!r->server->keep_alive_max ||
  	(r->server->keep_alive_max > r->connection->keepalives)) &&
  	(r->server->keep_alive_timeout > 0) &&
! 	(r->header_only || length || tenc ||
  	 ((r->proto_num >= 1001) && (r->byterange > 1 || (r->chunked = 1))))
&&
  	(!find_token(r->pool, conn, "close")) &&
  	((ka_sent = find_token(r->pool, conn, "keep-alive")) ||
--- 216,222 ----
      else if (r->server->keep_alive && (!r->server->keep_alive_max ||
  	(r->server->keep_alive_max > r->connection->keepalives)) &&
  	(r->server->keep_alive_timeout > 0) &&
! 	(r->status == USE_LOCAL_COPY || r->header_only || length || tenc ||
  	 ((r->proto_num >= 1001) && (r->byterange > 1 || (r->chunked = 1))))
&&
  	(!find_token(r->pool, conn, "close")) &&
  	((ka_sent = find_token(r->pool, conn, "keep-alive")) ||



Mime
View raw message