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
66 def upgrade(request, response)
67   @connection.send_connection_preface
68   # skip checks, it is assumed that this is the first
69   # request in the connection
70   stream = @connection.upgrade
71   handle_stream(stream, request)
72   @streams[request] = stream
73 
74   # clean up data left behind in the buffer, if the server started
75   # sending frames
76   data = response.to_s
77   @connection << data
78 end