]> err.no Git - varnish/commitdiff
Don't try to interpret the status code when we know the response is invalid.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 19 Oct 2007 13:49:27 +0000 (13:49 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 19 Oct 2007 13:49:27 +0000 (13:49 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2151 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_http.c

index a6c12486b7f871c7ed3b53a1cda3e6e843782f1b..922d5f1fa2583031265c5155c90d80ec008007c7 100644 (file)
@@ -503,8 +503,9 @@ http_DissectResponse(struct worker *w, const struct http_conn *htc, struct http
 
        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);