59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# File 'lib/thin/connection.rb', line 59
def pre_process
@request.remote_address = remote_address
@request.async_callback = method(:post_process)
if @backend.ssl?
@request.env["rack.url_scheme"] = "https"
if cert = get_peer_cert
@request.env['rack.peer_cert'] = cert
end
end
response = AsyncResponse
catch(:async) do
response = @app.call(@request.env)
end
response
rescue Exception => e
unexpected_error(e)
can_persist? && @request.persistent? ? Response::PERSISTENT_ERROR : Response::ERROR
end
|