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

H2_ALTSVC_SCHEMES = %w[https h2].freeze  

Public Instance methods

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