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
49 def upgrade(request, response)
50   # skip checks, it is assumed that this is the first
51   # request in the connection
52   stream = @connection.upgrade
53 
54   # on_settings
55   handle_stream(stream, request)
56   @streams[request] = stream
57 
58   # clean up data left behind in the buffer, if the server started
59   # sending frames
60   data = response.read
61   @connection << data
62 end