sample vmod for req body access & thoughts on req.body and BLOBs

Nils Goroll slink at
Mon Mar 9 22:38:02 CET 2015


I need something _tomorrow_, so I hacked up a vmod. this is just a PoC /
EXPERIMENTAL. The demo is just to spit out the req.body as resp.body. Assuming text.

This needs
- Ariannas #1664 patch
- My PRIV_TOPREQ patch


- As briefly discussed on the VDD, I think that we should change VMOD BLOBs to
  be struct objcore *

- this opens new perspectives to generate content (or even cache objects?) from

- candiates for stringifications should get an additional null byte after the
  blob end (if they don't have it, stringification would replace the last blob

- blob2string could just create an obj on the WS

- WS_Copy is useful, but for stringification f-pointer alignment is in the way
  -> I think we should have WS function variants for unaligned (char *) ptrs.

This list is incomplete, I need to wrap up.

More information about the varnish-dev mailing list