lib/async/http/protocol/response.rb in async-http-0.40.3 vs lib/async/http/protocol/response.rb in async-http-0.41.0
- old
+ new
@@ -16,28 +16,27 @@
# 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 '../response'
-require_relative '../headers'
+require 'protocol/http/response'
require_relative '../body/writable'
module Async
module HTTP
module Protocol
# This is generated by client protocols.
- class Response < HTTP::Response
- attr :protocol
+ class Response < ::Protocol::HTTP::Response
+ attr :connection
def hijack?
false
end
def peer
- if @protocol
- @protocol.peer
+ if @connection
+ @connection.peer
end
end
def remote_address
@remote_address ||= peer.remote_address