Commit bb902428 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'sh-fix-refs-controller-header-response' into 'master'

Coerce More-Logs-Offset HTTP header value to a string

See merge request gitlab-org/gitlab!32705
parents f5686e86 252cb923
......@@ -53,7 +53,7 @@ class Projects::RefsController < Projects::ApplicationController
format.json do
logs, next_offset = tree_summary.fetch_logs
response.headers["More-Logs-Offset"] = next_offset if next_offset
response.headers["More-Logs-Offset"] = next_offset.to_s if next_offset
render json: logs
end
......
......@@ -73,7 +73,7 @@ describe Projects::RefsController do
cache_key = "projects/#{project.id}/logs/#{project.commit.id}/#{path}/25"
expect(Rails.cache.fetch(cache_key)).to eq(['logs', 50])
expect(response.headers['More-Logs-Offset']).to eq(50)
expect(response.headers['More-Logs-Offset']).to eq("50")
end
end
end
......
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