Commit dce6cb2d authored by ahmyi's avatar ahmyi

Content-length defined in header response

Enable Content-Length to be defined in header response
parent 3decd462
...@@ -22,6 +22,7 @@ class Projects::RepositoriesController < Projects::ApplicationController ...@@ -22,6 +22,7 @@ class Projects::RepositoriesController < Projects::ApplicationController
if file_path if file_path
# Send file to user # Send file to user
response.headers['Content-Length'] = File.Open(file_path).size.to_s
send_file file_path send_file file_path
else else
render_404 render_404
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment