提交 dce6cb2d 编写于 作者: A ahmyi

Content-length defined in header response

Enable Content-Length to be defined in header response
上级 3decd462
......@@ -22,6 +22,7 @@ class Projects::RepositoriesController < Projects::ApplicationController
if file_path
# Send file to user
response.headers['Content-Length'] = File.Open(file_path).size.to_s
send_file file_path
else
render_404
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册