提交 4e79deff 编写于 作者: S Sachin87

code improved

上级 35215988
......@@ -291,12 +291,9 @@ def initialize(body, message = 200, headers = {})
if resp_cls && !resp_cls.body_permitted?
@body = nil
end
if @body.nil?
self['Content-Length'] = "0"
else
self['Content-Length'] = body.size.to_s
end
self['Content-Length'] = @body.nil? ? "0" : body.size.to_s
end
# Returns true if code is 2xx,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册