Content-length defined in header response

Enable Content-Length to be defined in header response
This commit is contained in:
ahmyi 2014-07-03 10:57:01 +08:00
parent 3decd46269
commit dce6cb2d84
1 changed files with 1 additions and 0 deletions

View File

@ -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