[PATCH] Expose the request body length to vcl_recv{}

Federico Schwindt fgsch at lodoss.net
Sat Apr 18 19:30:17 CEST 2015


Another patch while on the plane. As discussed at VDD15Q1 this exposes the
request body length via req.bodylen.

A few open questions / observations:

1. This will only set the length after std.cache_req_body(). We might want
to return content-length if std.cache_req_body() was not previously called.
I suppose some people might want to use it for other purposes than retrying
and if someone forgets calling cache_req_body() he/she might mistakenly
believe that there is no body. OTOH exposing this without curation might be
a bad idea.

2. This is only available in vcl_recv{}. Maybe it makes sense to expose
this to client and/or the backend side.

Comments? OKs?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20150418/5989b1ef/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Expose-the-request-body-length-to-vcl_recv.patch
Type: text/x-patch
Size: 2668 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20150418/5989b1ef/attachment.bin>


More information about the varnish-dev mailing list