r2062 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Sun Sep 30 22:08:26 CEST 2007
Author: phk
Date: 2007-09-30 22:08:26 +0200 (Sun, 30 Sep 2007)
New Revision: 2062
Modified:
trunk/varnish-cache/bin/varnishd/cache.h
trunk/varnish-cache/bin/varnishd/cache_http.c
Log:
Cache the numeric status code.
Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h 2007-09-30 19:54:28 UTC (rev 2061)
+++ trunk/varnish-cache/bin/varnishd/cache.h 2007-09-30 20:08:26 UTC (rev 2062)
@@ -116,6 +116,7 @@
unsigned char conds; /* If-* headers present */
enum httpwhence logtag;
+ int status;
txt hd[HTTP_HDR_MAX];
unsigned char hdf[HTTP_HDR_MAX];
Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c 2007-09-30 19:54:28 UTC (rev 2061)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c 2007-09-30 20:08:26 UTC (rev 2062)
@@ -327,8 +327,10 @@
{
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 *
More information about the varnish-commit
mailing list