Fork me on GitHub
#ring2015-09-07
>
nberger15:09:22

@bernhard I don't know of any pre-packaged solution for ring, but you should be able to do it by wrapping the body with a java.util.zip.GZIPOutputStream (or java.util.zip.InflaterInputStream) (when (#{"gzip" "deflate"} (:content-encoding request))) or something like that

nberger15:09:19

See a gist for doing this in rack, which is a ruby library that's similar to ring in philosophy (in fact, ring took inspiration from rack): https://gist.github.com/relistan/2109707

nberger15:09:03

Shameless plug: if you'd like to log the exact headers (and even the body during development) and other stuff from the request & response you might want to take a look to https://github.com/nberger/ring-logger simple_smile