Sha256: 8ccaff01ae9cb3d86731c2ad97dcbddf7ae18618498f37569ff9837840686ef3

Contents?: true

Size: 336 Bytes

Versions: 6

Compression:

Stored size: 336 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

6 entries across 6 versions & 1 rubygems

Version Path
http-3.3.0 lib/http/features/auto_inflate.rb
http-3.2.1 lib/http/features/auto_inflate.rb
http-3.2.0 lib/http/features/auto_inflate.rb
http-3.1.0 lib/http/features/auto_inflate.rb
http-3.0.0 lib/http/features/auto_inflate.rb
http-3.0.0.pre lib/http/features/auto_inflate.rb