Commit 29a80ccd authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Only attempt to decode status integer if we have a good separation.

Possibly ticket #164


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2089 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 72610954
......@@ -503,7 +503,12 @@ 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);
hp->status = strtoul(hp->hd[HTTP_HDR_STATUS].b, NULL /* XXX */, 10);
if (i != 0 && hp->status == 0) {
hp->status = i;
} else {
hp->status =
strtoul(hp->hd[HTTP_HDR_STATUS].b, NULL /* XXX */, 10);
}
return (i);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment