87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# File 'lib/rack/lint.rb', line 87
def response
check_environment(@env)
raise LintError, "response is not an Array, but #{@response.class}" unless @response.kind_of? Array
raise LintError, "response is frozen" if @response.frozen?
raise LintError, "response array has #{@response.size} elements instead of 3" unless @response.size == 3
@status, , @body = @response
hijack_proc = check_hijack_response(, @env)
if hijack_proc
[RACK_HIJACK] = hijack_proc
end
(@status, )
(@status, )
(@status, )
@head_request = @env[REQUEST_METHOD] == HEAD
@lint = (@env['rack.lint'] ||= []) << self
if (@env['rack.lint.body_iteration'] ||= 0) > 0
raise LintError, "Middleware must not call #each directly"
end
return [@status, , self]
end
|