mirror of https://github.com/apache/jclouds.git
Fixes issue with AzureBlobStore blockid incorrectly using base64url encoding
This commit is contained in:
parent
ddfb2ea77f
commit
6ef293dfd3
|
@ -440,9 +440,10 @@ public class AzureBlobStore extends BaseBlobStore {
|
|||
return sync.putBlockList(mpu.containerName(), azureBlob, blocks.build());
|
||||
}
|
||||
|
||||
static String makeBlockId(int partNumber) {
|
||||
return BaseEncoding.base64Url().encode(Ints.toByteArray(partNumber));
|
||||
}
|
||||
static String makeBlockId(int partNumber) {
|
||||
// Azure expects a base64-encoded string ONLY. It does not support base64url encoding.
|
||||
return BaseEncoding.base64().encode(Ints.toByteArray(partNumber));
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultipartPart uploadMultipartPart(MultipartUpload mpu, int partNumber, Payload payload) {
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.regex.Pattern;
|
|||
@Test(groups = "unit", testName = "AzureBlobStore")
|
||||
public class AzureBlobStoreTest {
|
||||
|
||||
private static final Pattern VALIDATION_PATTERN = Pattern.compile("[a-zA-Z0-9\\-_=]*");
|
||||
private static final Pattern VALIDATION_PATTERN = Pattern.compile("^[a-zA-Z0-9+/=]*$");
|
||||
|
||||
public void testMakeBlockId() {
|
||||
// how can i achieve something like a junit5 parametrized test in testng?
|
||||
|
|
Loading…
Reference in New Issue