module HTTPX::AltSvc::ConnectionMixin

  1. lib/httpx/altsvc.rb

makes connections able to accept requests destined to primary service.

Methods

Public Instance

  1. match?
  2. send

Constants

ALTSVC_IGNORE_IVARS = %i[@ssl].freeze  
H2_ALTSVC_SCHEMES = %w[https h2].freeze  

Public Instance methods

match?(uri, options)
[show source]
   # File lib/httpx/altsvc.rb
21 def match?(uri, options)
22   return false if !used? && (@state == :closing || @state == :closed)
23 
24   match_altsvcs?(uri) && match_altsvc_options?(uri, options)
25 end
send(request)
[show source]
   # File lib/httpx/altsvc.rb
15 def send(request)
16   request.headers["alt-used"] = @origin.authority if @parser && !@write_buffer.full? && match_altsvcs?(request.uri)
17 
18   super
19 end