class HTTPX::Plugins::H2C::H2CParser

  1. lib/httpx/plugins/h2c.rb
Superclass: HTTP2

Methods

Public Instance

  1. upgrade

Public Instance methods

upgrade(request, response)
[show source]
   # File lib/httpx/plugins/h2c.rb
29 def upgrade(request, response)
30   # skip checks, it is assumed that this is the first
31   # request in the connection
32   stream = @connection.upgrade
33 
34   # on_settings
35   handle_stream(stream, request)
36   @streams[request] = stream
37 
38   # clean up data left behind in the buffer, if the server started
39   # sending frames
40   data = response.read
41   @connection << data
42 end