mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-21 10:36:04 +10:00
Content-length defined in header response
Enable Content-Length to be defined in header response
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user