mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Some minor cleanup
This commit is contained in:
parent
9844daaaa8
commit
44c8c1ab50
3 changed files with 6 additions and 7 deletions
|
@ -51,6 +51,8 @@ module Puma
|
|||
@io.close
|
||||
end
|
||||
|
||||
# The object used for a request with no body. All requests with
|
||||
# no body share this one object since it has no state.
|
||||
EmptyBody = NullIO.new
|
||||
|
||||
def setup_body
|
||||
|
|
|
@ -2,8 +2,9 @@ module Puma
|
|||
class Reactor
|
||||
DefaultSleepFor = 5
|
||||
|
||||
def initialize(events, app_pool)
|
||||
@events = events
|
||||
def initialize(server, app_pool)
|
||||
@server = server
|
||||
@events = server.events
|
||||
@app_pool = app_pool
|
||||
|
||||
@mutex = Mutex.new
|
||||
|
@ -35,7 +36,7 @@ module Puma
|
|||
end
|
||||
# The client doesn't know HTTP well
|
||||
rescue HttpParserError => e
|
||||
@events.parse_error self, c.env, e
|
||||
@events.parse_error @server, c.env, e
|
||||
|
||||
rescue EOFError
|
||||
c.close
|
||||
|
|
|
@ -374,10 +374,6 @@ module Puma
|
|||
env[REMOTE_ADDR] = client.peeraddr.last
|
||||
end
|
||||
|
||||
# The object used for a request with no body. All requests with
|
||||
# no body share this one object since it has no state.
|
||||
EmptyBody = NullIO.new
|
||||
|
||||
# Given the request +env+ from +client+ and a partial request body
|
||||
# in +body+, finish reading the body if there is one and invoke
|
||||
# the rack app. Then construct the response and write it back to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue