-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[azure-storage-blob] BlobClient upload_blob does not use headers parameter for multi-block uploads. #13506
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. |
Hi @jboelter Thanks for reaching out and finding the workaround to unblock yourself. azure-sdk-for-python/sdk/storage/azure-storage-blob/azure/storage/blob/_upload_helpers.py Line 150 in 900aa7d
Do you need that customized header on each put block request? |
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
The headers should be on every outgoing request. As noted in the bug, the headers are absent from |
Hi @jboelter It looks like we intended to only add the customized header in the exact "write" operation (change blob content) which is upload blob or commit block list operation. So it's not a bug.... |
Hi @jboelter just wanted to let you know that we have a PR up for this issue. I'll let you know once its merged. |
Describe the bug
BlobClient
upload_blob()
does not inject the headers parameter if the upload takes the multi-block upload code path (single block upload works).To Reproduce
The provided headers will not be injected into the request if the object size exceeds
blob_settings.max_single_put_size
(default 64 * 1024 * 1024). Starting from a SAS URL.Expected behavior
The
headers
parameter toupload_blob
should work for both single PUT uploads and multi-block uploads.Fix appears to be just passing
headers
toupload_data_chunks
1 2 andupload_substream_blocks
1 2 inupload_block_blob
. Not sure where else this may show up.Additional context
We use a custom outgoing reverse proxy that expects certain headers.
Workaround the issue with a
raw_request_hook
.The text was updated successfully, but these errors were encountered: