Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nurse committed Sep 15, 2017
1 parent 09f06e4 commit e355ba1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/td/client/api/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ def job_result_download(job_id, format='msgpack', autodecode=true)
chunk = infl.inflate(chunk) if infl
yield chunk, current_total_chunk_size
end
validate_response_status(response)

# for the case response body is empty
# Note that webmock returns response.body as "" instead of nil
validate_response_status(response, 0) if response.body.to_s.empty?

# completed?
validate_content_length_with_range(response, current_total_chunk_size)
Expand Down

0 comments on commit e355ba1

Please sign in to comment.