class Async::HTTP::AcceptEncoding
def call(request, *)
def call(request, *) request.headers['accept-encoding'] = @accept_encoding response = super if !response.body.empty? and content_encoding = response.headers['content-encoding'] encodings = content_encoding.split(/\s*,\s*/) body = response.body # We want to unwrap all encodings encodings.reverse_each do |name| if wrapper = @wrappers[name] body = wrapper.call(body) end end response.body = body end return response end