[Varnish] #527: String representation of 'obj.ttl' not implemented yet.

Varnish varnish-bugs at projects.linpro.no
Mon Jul 27 05:13:34 CEST 2009


#527: String representation of 'obj.ttl' not implemented yet.
----------------------+-----------------------------------------------------
 Reporter:  aj        |        Owner:  phk
     Type:  defect    |       Status:  new
 Priority:  normal    |    Milestone:     
Component:  varnishd  |      Version:  2.0
 Severity:  normal    |   Resolution:     
 Keywords:            |  
----------------------+-----------------------------------------------------
Comment (by kb):

 Your first problem will be:

 {{{
 Variable 'obj.ttl' not accessible in method 'vcl_deliver'.
 At: (input Line 218 Pos 39)
         set resp.http.X-Varnish-TTL = obj.ttl;
 --------------------------------------#######-
 }}}

 You can access it in vcl_fetch, but then you can only set an obj header.
 Which is not thread safe and will eventually crash the child (been there,
 done that).  Also, varnish trunk seems to remove most obj access, both
 read and write.  So this ability won't likely last, anyway.

 But if you like living on the dangerous side:

 {{{
 --- lib/libvcl/vcc_string.c.O   2009-07-26 20:02:09.000000000 -0700
 +++ lib/libvcl/vcc_string.c     2009-07-26 20:02:27.000000000 -0700
 @@ -174,6 +174,9 @@
                 case BACKEND:
                         Fb(tl, 0, "VRT_backend_string(sp)");
                         break;
 +               case TIME:
 +                       Fb(tl, 0, "VRT_int_string(sp, %s)", vp->rname);
 +                       break;
                 default:
                         vsb_printf(tl->sb, "String representation of '%s'"
                             " not implemented yet.\n", vp->name);
 }}}

 (just my US$0.02! YMMV, not heavily tested)

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/527#comment:1>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list