Re: Compare Hex to Decimal

2018-04-14 Thread jpotter-varnish
Hi Michael, I did something similar to this several years back using inline C: https://varnish-cache.org/docs/5.1/users-guide/vcl-inline-c.html I’m super-rusty on my C, so ask better minds, but I’d start by doing the if

Compare Hex to Decimal

2018-04-13 Thread Michael Kennedy
Hi, I have a URL that contains a Unix hex timestamp (something like 5ace8c5d). The timestamp should be within X minutes of now, and is used as part of an access control mechanism. I want to do something like this: if (std.time(req.http.x-hextime, now) < now - 1w) { ... } Is there an