lib/async/http/protocol/request.rb in async-http-0.40.3 vs lib/async/http/protocol/request.rb in async-http-0.41.0

- old
+ new

@@ -16,12 +16,12 @@ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -require_relative '../request' -require_relative '../headers' +require 'protocol/http/request' +require 'protocol/http/headers' require_relative '../body/writable' module Async module HTTP @@ -29,23 +29,23 @@ # Failed to send the request. The request body has NOT been consumed (i.e. #read) and you should retry the request. class RequestFailed < StandardError end # This is generated by server protocols. - class Request < HTTP::Request - attr :protocol + class Request < ::Protocol::HTTP::Request + attr :connection def hijack? false end def push? false end def peer - if @protocol - @protocol.peer + if @connection + @connection.peer end end def remote_address @remote_address ||= peer.remote_address