-
Notifications
You must be signed in to change notification settings - Fork 147
Conversation
gaul
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash commits.
| String blockId = AzureBlobStore.makeBlockId(partNumber); | ||
| // if (!blockId.matches(VALIDATION_REGEX)){ | ||
| // System.out.println("--------------------------------------------- " + partNumber + " -> '" + blockId + "' -> " + blockId.matches(VALIDATION_REGEX)); | ||
| //} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this commented code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... removed
| @Test(groups = "unit", testName = "AzureBlobStore") | ||
| public class AzureBlobStoreTest { | ||
|
|
||
| static String VALIDATION_REGEX = "[a-zA-Z0-9\\-_=]*"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this private and final and use Pattern.compile??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... i did so ... hope you like it.
|
Thank you for your contribution @ChJung1! |
|
Hi Steffen Gürtler,
I did the pull request for the encoding with Base64Url, because with Base64 i got an error similar to yours.
Base64Url is meant to ensure you can use the string in urls.
The string you have contains a minus sign, so this is indeed Base64Url, and not Base64, so my fix is in there.
Your problem looks very similar to mine, so is it maybe the "==" this time?
BTW, while changing the code i wondered if we could implement makeBlockId() by using String.valueOf() instead,
which is much simpler code, a shorter string, and uses only digits (as Block-ID is an integer and probably positive)
Feel free to try that, and if it helps you can maybe also remove that not-so-helpful test I added.
Andrew Gaul will then hopefully approve your pull request.
Good luck!
ChJung1
Gesendet: Dienstag, 25. Juli 2023 um 18:07 Uhr
Von: "Steffen Gürtler" ***@***.***>
An: "apache/jclouds" ***@***.***>
Cc: "ChJung1" ***@***.***>, "Mention" ***@***.***>
Betreff: Re: [apache/jclouds] Jclouds 1615 (PR #155)
I have tested some simple things with the current JCloud master branch code base against an Azure storage account and run into an error message for a 4 gigabyte upload, split into 5 MByte chunks in a multipart upload:
Could it be, that the base64 encoding in the url version isn't accepted by Azure?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
Please open a Jira issue for this regression. |

Hi @gaul,
This is my first github pull request, so forgive me if i did something the wrong way.
I tried to add a test, but feel that it kind of doesn't test the core of the problem.
Feedback welcome.
ChJung1