You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ga...@apache.org on 2017/11/11 06:50:03 UTC

jclouds git commit: Include HTTP status code in illegal range error

Repository: jclouds
Updated Branches:
  refs/heads/master 8b94febfe -> 26570db68


Include HTTP status code in illegal range error


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/26570db6
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/26570db6
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/26570db6

Branch: refs/heads/master
Commit: 26570db680a43c015470c646e34a75361928e88e
Parents: 8b94feb
Author: Andrew Gaul <ga...@apache.org>
Authored: Fri Nov 10 22:49:45 2017 -0800
Committer: Andrew Gaul <ga...@apache.org>
Committed: Fri Nov 10 22:49:45 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/jclouds/blobstore/config/LocalBlobStore.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/26570db6/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java
----------------------------------------------------------------------
diff --git a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java
index 6602360..f440312 100644
--- a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java
+++ b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java
@@ -704,11 +704,11 @@ public final class LocalBlobStore implements BlobStore {
                   offset = Long.parseLong(firstLast[0]);
                   last = Long.parseLong(firstLast[1]);
                } else {
-                  throw new HttpResponseException("illegal range: " + s, null, null);
+                  throw new HttpResponseException("illegal range: " + s, null, HttpResponse.builder().statusCode(416).build());
                }
 
                if (offset >= blob.getPayload().getContentMetadata().getContentLength()) {
-                  throw new HttpResponseException("illegal range: " + s, null, null);
+                  throw new HttpResponseException("illegal range: " + s, null, HttpResponse.builder().statusCode(416).build());
                }
                if (last + 1 > blob.getPayload().getContentMetadata().getContentLength()) {
                   last = blob.getPayload().getContentMetadata().getContentLength() - 1;