r4535 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Feb 5 10:20:21 CET 2010


Author: phk
Date: 2010-02-05 10:20:20 +0100 (Fri, 05 Feb 2010)
New Revision: 4535

Modified:
   trunk/varnish-cache/bin/varnishd/cache_http.c
   trunk/varnish-cache/bin/varnishd/mgt_param.c
Log:
Always send HTTP/1.1 back to the client.



Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c	2010-02-05 08:58:29 UTC (rev 4534)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c	2010-02-05 09:20:20 UTC (rev 4535)
@@ -503,9 +503,9 @@
 http_ProtoVer(struct http *hp)
 {
 
-	if (!strcmp(hp->hd[HTTP_HDR_PROTO].b, "HTTP/1.0"))
+	if (!strcasecmp(hp->hd[HTTP_HDR_PROTO].b, "HTTP/1.0"))
 		hp->protover = 1.0;
-	else if (!strcmp(hp->hd[HTTP_HDR_PROTO].b, "HTTP/1.1"))
+	else if (!strcasecmp(hp->hd[HTTP_HDR_PROTO].b, "HTTP/1.1"))
 		hp->protover = 1.1;
 	else
 		hp->protover = 0.9;
@@ -621,10 +621,7 @@
 
 	CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC);
 	CHECK_OBJ_NOTNULL(to, HTTP_MAGIC);
-	if (params->client_http11)
-		http_SetH(to, HTTP_HDR_PROTO, "HTTP/1.1");
-	else
-		http_copyh(to, fm, HTTP_HDR_PROTO);
+	http_SetH(to, HTTP_HDR_PROTO, "HTTP/1.1");
 	http_copyh(to, fm, HTTP_HDR_STATUS);
 	http_copyh(to, fm, HTTP_HDR_RESPONSE);
 }

Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_param.c	2010-02-05 08:58:29 UTC (rev 4534)
+++ trunk/varnish-cache/bin/varnishd/mgt_param.c	2010-02-05 09:20:20 UTC (rev 4535)
@@ -615,12 +615,6 @@
 		"Listen queue depth.",
 		MUST_RESTART,
 		"1024", "connections" },
-	{ "client_http11", tweak_bool, &master.client_http11, 0, 0,
-		"Force all client responses to be HTTP/1.1.\n"
-		"By default we copy the protocol version from the "
-		"backend response.",
-		EXPERIMENTAL,
-		"off", "bool" },
 	{ "cli_timeout", tweak_timeout, &master.cli_timeout, 0, 0,
 		"Timeout for the childs replies to CLI requests from "
 		"the master.",



More information about the varnish-commit mailing list