Skip to content

Commit

Permalink
Merge pull request #69 from bevanloon/remove-spurious-whitespace
Browse files Browse the repository at this point in the history
Remove spurious whitespace
  • Loading branch information
ncr committed Dec 8, 2017
2 parents c64036f + bbf9322 commit fca3a78
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/net_http_hacked.rb
Expand Up @@ -4,11 +4,11 @@
#
# [status, headers, streamable_body]
#
# See http://github.com/aniero/rack-streaming-proxy
# See http://github.com/aniero/rack-streaming-proxy
# for alternative that uses additional process.
#
# BTW I don't like monkey patching either
# but this is not real monkey patching.
# but this is not real monkey patching.
# I just added some methods and named them very uniquely
# to avoid eventual conflicts. You're safe. Trust me.
#
Expand Down Expand Up @@ -45,7 +45,7 @@ class Net::HTTP
#
# res
# end

def begin_request_hacked(req)
begin_transport req
req.exec @socket, @curr_http_version, edit_path(req.path)
Expand All @@ -56,7 +56,7 @@ def begin_request_hacked(req)
@req_hacked, @res_hacked = req, res
@res_hacked
end

def end_request_hacked
@res_hacked.end_reading_body_hacked
end_transport @req_hacked, @res_hacked
Expand All @@ -77,12 +77,12 @@ class Net::HTTPResponse
# @socket = nil
# end
# end

def begin_reading_body_hacked(sock, reqmethodallowbody)
@socket = sock
@body_exist = reqmethodallowbody && self.class.body_permitted?
end

def end_reading_body_hacked
self.body
@socket = nil
Expand Down

0 comments on commit fca3a78

Please sign in to comment.