You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ICS.UCI.EDU> on 1997/03/11 06:34:22 UTC
[PATCH]: "Undying keepalives in 1.2b7" on Solaris 2.x (fwd)
The addition of persistence for 304 responses did not take into
consideration the browsermatch Netscape-bug-avoidance. The following
patch should fix this.
.....Roy
Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.107
diff -c -r1.107 http_protocol.c
*** http_protocol.c 1997/03/07 14:43:52 1.107
--- http_protocol.c 1997/03/11 05:32:24
***************
*** 1609,1615 ****
send_header(r, "Vary");
send_header(r, "Warning");
send_header(r, "WWW-Authenticate");
! set_keepalive(r);
bputs("\015\012", c->client);
return;
}
--- 1609,1616 ----
send_header(r, "Vary");
send_header(r, "Warning");
send_header(r, "WWW-Authenticate");
! if (!table_get(r->subprocess_env, "nokeepalive"))
! set_keepalive(r);
bputs("\015\012", c->client);
return;
}
Re: [PATCH]: "Undying keepalives in 1.2b7" on Solaris 2.x (fwd)
Posted by Dean Gaudet <dg...@arctic.org>.
I find it really weird that I haven't seen this problem on hotwired where
I've been running this for ages...
Why don't we just move the nokeepalive test into set_keepalive? 'cause we
also have the 204 case that can keepalive. Also right now if we should
need to nokeepalive a HTTP/1.1 client we don't do it right because it
doesn't issue Connection: close.
So here's a patch that moves the nokeepalive test into set_keepalive.
Dean
Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.107
diff -c -3 -r1.107 http_protocol.c
*** http_protocol.c 1997/03/07 14:43:52 1.107
--- http_protocol.c 1997/03/11 08:21:41
***************
*** 260,266 ****
char *tenc = table_get(r->headers_out, "Transfer-Encoding");
int ka_sent;
! if (r->connection->keepalive == -1) /* Did we get bad input? */
r->connection->keepalive = 0;
else if (r->server->keep_alive && (!r->server->keep_alive_max ||
(r->server->keep_alive_max > r->connection->keepalives)) &&
--- 260,268 ----
char *tenc = table_get(r->headers_out, "Transfer-Encoding");
int ka_sent;
! if (table_get(r->subprocess_env, "nokeepalive")) {
! /* fall through to the no keepalive case */
! } else if (r->connection->keepalive == -1) /* Did we get bad input? */
r->connection->keepalive = 0;
else if (r->server->keep_alive && (!r->server->keep_alive_max ||
(r->server->keep_alive_max > r->connection->keepalives)) &&
***************
*** 1116,1123 ****
basic_http_header (r);
! if (!table_get(r->subprocess_env, "nokeepalive"))
! set_keepalive (r);
if (r->chunked) {
bputs("Transfer-Encoding: chunked\015\012", fd);
--- 1118,1124 ----
basic_http_header (r);
! set_keepalive (r);
if (r->chunked) {
bputs("Transfer-Encoding: chunked\015\012", fd);