lib/httpx/request.rb in httpx-0.6.7 vs lib/httpx/request.rb in httpx-0.7.0
- old
+ new
@@ -35,12 +35,10 @@
attr_reader :verb, :uri, :headers, :body, :state
attr_reader :options, :response
- attr_accessor :timer
-
def_delegator :@body, :<<
def_delegator :@body, :empty?
def_delegator :@body, :chunk!
@@ -81,11 +79,10 @@
end
def response=(response)
return unless response
- @timer.cancel if @timer
@response = response
end
def path
path = uri.path.dup
@@ -236,18 +233,16 @@
case @response.status
when 100
# deallocate
@response = nil
- when 417
- @response = @response
- return
end
end
when :done
return if @state == :expect
end
@state = nextstate
+ emit(@state)
nil
end
def expects?
@headers["expect"] == "100-continue" &&