Sha256: 44a5c06c36afdc8bdd94a9a4bf665bc378481cf3a78aa2aeee7bf5d063148244

Contents?: true

Size: 335 Bytes

Versions: 3

Compression:

Stored size: 335 Bytes

Contents

# frozen_string_literal: true
module HTTP
  module Features
    class AutoInflate < Feature
      def stream_for(connection, response)
        if %w(deflate gzip x-gzip).include?(response.headers[:content_encoding])
          Response::Inflater.new(connection)
        else
          connection
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
http-2.2.2 lib/http/features/auto_inflate.rb
http-2.2.1 lib/http/features/auto_inflate.rb
http-2.2.0 lib/http/features/auto_inflate.rb