lib/async/http/protocol/http1/server.rb in async-http-0.35.1 vs lib/async/http/protocol/http1/server.rb in async-http-0.36.0
- old
+ new
@@ -36,11 +36,11 @@
end
return request
rescue
# Bad Request
- write_response(self.version, 400, {}, nil)
+ write_response(@version, 400, {}, nil)
raise
end
# Server loop.
@@ -49,13 +49,13 @@
response = yield(request, self)
return if @stream.closed?
if response
- write_response(self.version, response.status, response.headers, response.body, request.head?)
+ write_response(@version, response.status, response.headers, response.body, request.head?)
else
# If the request failed to generate a response, it was an internal server error:
- write_response(self.version, 500, {}, nil)
+ write_response(@version, 500, {}, nil)
end
# Gracefully finish reading the request body if it was not already done so.
request.finish