r2151 - trunk/varnish-cache/bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Fri Oct 19 15:49:27 CEST 2007


Author: des
Date: 2007-10-19 15:49:27 +0200 (Fri, 19 Oct 2007)
New Revision: 2151

Modified:
   trunk/varnish-cache/bin/varnishd/cache_http.c
Log:
Don't try to interpret the status code when we know the response is invalid.


Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c	2007-10-19 12:01:19 UTC (rev 2150)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c	2007-10-19 13:49:27 UTC (rev 2151)
@@ -503,8 +503,9 @@
 
 	if (i != 0 || memcmp(hp->hd[HTTP_HDR_PROTO].b, "HTTP/1.", 7))
 		WSLR(w, SLT_HttpGarbage, htc->fd, htc->rxbuf);
-	if (i != 0 && hp->status == 0) {
-		hp->status = i;
+	if (i != 0) {
+		if (hp->status == 0)
+			hp->status = i;
 	} else {
 		hp->status = 
 		    strtoul(hp->hd[HTTP_HDR_STATUS].b, NULL /* XXX */, 10);




More information about the varnish-commit mailing list