mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-06 00:02:08 -04:00
most of the code was moved to the transcoder layer. The `compression_threshold_size` option has been removed. The `:compression/brotli` plugin becomes only ´:brotli`, and depends on the new transcoding APIs. options to skip compression and decompression were added.
15 lines
473 B
Ruby
15 lines
473 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "test_helper"
|
|
|
|
class CompressionTest < Minitest::Test
|
|
include HTTPX
|
|
|
|
def test_ignore_encoding_on_range
|
|
request = HTTPX::Session.new.build_request("GET", "http://example.com")
|
|
assert request.headers.key?("accept-encoding")
|
|
range_request = HTTPX::Session.new.build_request("GET", "http://example.com", headers: { "range" => "bytes=100-200" })
|
|
assert !range_request.headers.key?("accept-encoding")
|
|
end
|
|
end
|