Inconsistency in VRT_SetHdr/GetHhdr field sizes
AD
straightflush at gmail.com
Sun Jan 23 23:55:27 CET 2011
Hello,
I undertstand then when using VRT_GetHdr the prefix to the header field is
the size of the field (like "\005X-AB:"). However i noticed when using the
-C flag that this does not seem to be consistent and called me some issues
when trying to access these fields using inline C. Here is an example vcl
backend default {
.host = "127.0.0.1";
.port = "80";
}
sub vcl_recv {
set req.http.X-Cache-Key = "test";
}
This should mean the field is \012X-Cache-Key: however when running this vcl
through -C it shows up as 14 (2 more bytes than the full size of the field).
Any ideas why this would be ?
# varnishd -C -f test.vcl | grep Cache
VRT_SetHdr(sp, HDR_REQ, "\014X-Cache-Key:", "test",
vrt_magic_string_end);
" set req.http.X-Cache-Key = \"test\"; \n"
Thanks
AD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110123/e6c38359/attachment-0003.html>
More information about the varnish-misc
mailing list