httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: ie4pr2
Date Thu, 17 Jul 1997 10:32:36 GMT
On Thu, 17 Jul 1997, Roy T. Fielding wrote:

> Yes, it is.  The fix is to ignore force-response-1.0 when the request is
> from an HTTP/1.1 client.

I've asked the submitter of PR#875 to tell me if removing the
force-response works for him.  I don't know how/care to test this problem
at this moment.  The patch below implements your suggestion, let's hope
it's all we need to do.

> >Additionally, our nokeepalive code does not work for a 1.1 request.  The
> >patch below fixes this (and re-orders a test putting the cheap one first).
> 
> It isn't supposed to -- consider the case of HTTP/1.1 proxies being
> used by older clients.  The patch is wrong.

Sorry, but now I know that it *is* a keepalive problem with IE4 PR2.

I downloaded and installed PR2 on my computer.  And with keep-alive
disabled there's no problem with redirects (with keep-alive enabled
PR2 just hangs waiting for the server to close the connection after the
response).  I am guessing this is only an issue with non-200 responses.
But I frankly don't care at this hour.

I tried issuing a "Connection: keep-alive" header, just to reinforce
reality, but it didn't like that either.

The patch below chooses to respect nokeepalive in a 1.1 connection if
there's no Via header.  However I gag at this.  I want this to be a
workaround for 1.2 only.  I would prefer if 1.3 included mod_setenvif,
and we do something like:

# nokeepalive if IE4 PR2 not coming through a proxy
SetEnvIf User-Agent "MSIE 4.0b2;" nokeepalive
SetEnvIf Via .* !nokeepalive

(At least I think mod_setenvif includes the same syntax as mod_browser.)

Regardless of how we solve this, the workaround should only be recommended
for PR2.  I've told the contact at microsoft that I expect them to fix
the problem for the next release.

Dean

Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_protocol.c,v
retrieving revision 1.139
diff -u -r1.139 http_protocol.c
--- http_protocol.c	1997/07/15 22:36:51	1.139
+++ http_protocol.c	1997/07/17 10:18:18
@@ -304,9 +304,11 @@
         !status_drops_connection(r->status) &&
         !wimpy &&
         !find_token(r->pool, conn, "close") &&
-        (((ka_sent = find_token(r->pool, conn, "keep-alive")) &&
-          !table_get(r->subprocess_env, "nokeepalive")) ||
-         (r->proto_num >= 1001))
+        ((r->proto_num >= 1001 && 
+	  (!table_get(r->subprocess_env, "nokeepalive") ||
+	   table_get(r->headers_in, "Via"))) ||
+         ((ka_sent = find_token(r->pool, conn, "keep-alive")) &&
+          !table_get(r->subprocess_env, "nokeepalive")))
        ) {
 	char header[256];
 	int left = r->server->keep_alive_max - r->connection->keepalives;
@@ -315,7 +317,7 @@
 	r->connection->keepalives++;
 	
 	/* If they sent a Keep-Alive token, send one back */
-	if (ka_sent) {
+	if (1 /*ka_sent*/) {
 	    if (r->server->keep_alive_max)
 		ap_snprintf(header, sizeof(header), "timeout=%d, max=%d",
 			    r->server->keep_alive_timeout, left);
@@ -1044,8 +1046,9 @@
     
     if (!r->status_line)
         r->status_line = status_lines[index_of_response(r->status)];
-    
-    if (table_get(r->subprocess_env,"force-response-1.0"))
+
+    if (r->proto_num == 1000
+	&& table_get(r->subprocess_env,"force-response-1.0"))
 	protocol = "HTTP/1.0";
     else
 	protocol = SERVER_PROTOCOL;


Mime
View raw message