r502 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Wed Jul 19 21:45:14 CEST 2006


Author: phk
Date: 2006-07-19 21:45:14 +0200 (Wed, 19 Jul 2006)
New Revision: 502

Modified:
   trunk/varnish-cache/bin/varnishd/cache_center.c
Log:
Don't bother determining if we should close if we already have done so.
Also: we may not have valid headers if cache_http.c threw a 400.


Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2006-07-19 19:43:39 UTC (rev 501)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2006-07-19 19:45:14 UTC (rev 502)
@@ -85,7 +85,9 @@
 	char *b;
 
 	assert(sp->obj == NULL);
-	if (http_GetHdr(sp->http, "Connection", &b) &&
+	if (sp->fd < 0) {
+		/* Allready closed */
+	} else if (http_GetHdr(sp->http, "Connection", &b) &&
 	    !strcmp(b, "close")) {
 		vca_close_session(sp, "Connection header");
 	} else if (strcmp(sp->http->proto, "HTTP/1.1")) {




More information about the varnish-commit mailing list