Commit 93349b44 authored by Shinya Maeda's avatar Shinya Maeda

Append trace only if the job is running

parent ad9e0091
...@@ -165,7 +165,7 @@ module API ...@@ -165,7 +165,7 @@ module API
body_start = content_range[0].to_i body_start = content_range[0].to_i
body_end = body_start + body_data.bytesize body_end = body_start + body_data.bytesize
stream_size = job.trace.append(body_data, body_start) stream_size = job.trace.append(body_data, body_start) if job.running?
unless stream_size == body_end unless stream_size == body_end
break error!('416 Range Not Satisfiable', 416, { 'Range' => "0-#{stream_size}" }) break error!('416 Range Not Satisfiable', 416, { 'Range' => "0-#{stream_size}" })
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