Skip to content

Commit

Permalink
Fix setting ContentRange to inclusive positions
Browse files Browse the repository at this point in the history
  • Loading branch information
mziccard committed Nov 13, 2015
1 parent 6890fa1 commit beff64a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public byte[] read(StorageObject from, Map<Option, ?> options, long position, in
.setIfGenerationMatch(IF_GENERATION_MATCH.getLong(options))
.setIfGenerationNotMatch(IF_GENERATION_NOT_MATCH.getLong(options));
MediaHttpDownloader downloader = req.getMediaHttpDownloader();
downloader.setContentRange(position, (int) position + bytes);
downloader.setContentRange(position, (int) position + bytes - 1);
downloader.setDirectDownloadEnabled(true);
ByteArrayOutputStream output = new ByteArrayOutputStream();
req.executeMediaAndDownloadTo(output);
Expand Down

0 comments on commit beff64a

Please sign in to comment.