Implementing req.do_gunzip

Federico Schwindt fgsch at lodoss.net
Mon Feb 13 01:28:29 CET 2017


Hi,

Sounds like a good feature and shouldn't be too hard since we already have
the VFPs
That said, if we were to implement it I reckon we should have both
req.do_gunzip and req.do_gzip.

Best.

On Fri, Feb 10, 2017 at 4:33 PM, <jonathan.huot at thomsonreuters.com> wrote:

> Hi varnish-dev,
>
> We're currently migrating our vmods from varnish 3, and we have a vmod
> which
> is uncompressing request's body to handle situation where backends are
> very old
> and not able to handle gzip encoding... It happens sometime.
>
> Instead of rewriting this vmod into a V4 module, I was guessing if you see
> the benefit of integrating into the core instead? It could be done by doing
> something like
>
> set req.do_gunzip = true;
>
>
> VTC could be approx..:
>
> $ cat g00008.vtc
> varnishtest "test basic gunzip for client request body"
>
> server s1 {
>         rxreq
>         expect req.http.content-encoding == <undef>
>         txresp -status 200
> } -start
>
> varnish v1 -cliok "param.set http_gzip_support true" -vcl+backend {
>         sub vcl_recv {
>                 set req.do_gunzip = true;
>         }
> } -start
>
> client c1 {
>         txreq -gzipbody {FOOBARFOO}
>         rxresp
>         expect resp.status == 200
> } -run
>
> varnish v1 -expect n_gzip == 0
> varnish v1 -expect n_gunzip == 1
>
>
> If you think it's interesting and any PR are welcomed, I will be glad to
> do one.
> Else, I will upgrade our VMOD instead :-)
>
> --
> Jonathan Huot
> Thomson Reuters
>
>
> ________________________________
>
> This e-mail is for the sole use of the intended recipient and contains
> information that may be privileged and/or confidential. If you are not an
> intended recipient, please notify the sender by return e-mail and delete
> this e-mail and any attachments. Certain required legal entity disclosures
> can be accessed on our website.<http://site.thomsonreuters.com/site/
> disclosures/>
>
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20170213/ff2fc9bc/attachment.html>


More information about the varnish-dev mailing list