Commit f2438ba1 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Cache the numeric status code.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2062 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent f2badaa9
......@@ -116,6 +116,7 @@ struct http {
unsigned char conds; /* If-* headers present */
enum httpwhence logtag;
int status;
txt hd[HTTP_HDR_MAX];
unsigned char hdf[HTTP_HDR_MAX];
......
......@@ -327,8 +327,10 @@ http_GetStatus(const struct http *hp)
{
Tcheck(hp->hd[HTTP_HDR_STATUS]);
return (strtoul(hp->hd[HTTP_HDR_STATUS].b,
NULL /* XXX */, 10));
if (hp->status == 0)
hp->status = strtoul(hp->hd[HTTP_HDR_STATUS].b,
NULL /* XXX */, 10));
return (hp->status);
}
const char *
......
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