httpx/test/http_test.rb
HoneyryderChuck 2da56ce9af fix: keep connection alive if HTTP/1.1 and there is connection-related
header;

this was wrongly closing connections for HTTP/1.1 connections which
didn't send a "Connection" header; according to spec, the default is
"Keep-Alive", contrary to HTTP/1.0
2019-05-15 14:45:06 +00:00

34 lines
668 B
Ruby

# frozen_string_literal: true
require_relative "support/http_helpers"
class HTTPTest < Minitest::Test
include HTTPHelpers
include Requests
include Head
include Get
include ChunkedGet
include WithBody
include WithChunkedBody
include Headers
include ResponseBody
include IO
include Timeouts
include Errors
include Plugins::Proxy unless ENV.key?("HTTPX_NO_PROXY")
include Plugins::Authentication
include Plugins::FollowRedirects
include Plugins::Cookies
include Plugins::Compression
include Plugins::H2C
include Plugins::Retries
include Plugins::Multipart
private
def origin(orig = httpbin)
"http://#{orig}"
end
end