Dag-Erling Smørgrav <[EMAIL PROTECTED]> writes:
> Looks like an oversight; resp.status is both readable and writable, but
> obj.status is write-only.
Try the attached patch.
DES
--
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
Index: bin/varnishd/cache_vrt.c
===================================================================
--- bin/varnishd/cache_vrt.c (revision 1742)
+++ bin/varnishd/cache_vrt.c (working copy)
@@ -234,6 +234,14 @@
http_SetH(&sp->obj->http, HTTP_HDR_STATUS, p);
}
+int
+VRT_r_obj_status(struct sess *sp)
+{
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
+ return (atoi(sp->obj->http.hd[HTTP_HDR_STATUS].b));
+}
+
void
VRT_l_resp_status(struct sess *sp, int num)
{
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc