-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Ignored text encoding specified in method parameter #20795
Copy link
Copy link
Closed
Labels
Azure.CoreClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK team
Description
- Package Name: azure-core
- Package Version: 1.14.0
- Operating System: Any (found on Windows)
- Python Version: 3.9.7
Describe the bug
AioHttpTransportResponse's text method ignores encoding parameter, if it is not None.
When calling azure.storage.blob.aio.BlobClient's stage_block method, its corresponding response "201 created" with empty body. AioHttpTransportResponse#text method ignores request's "uft-8" encoding and get failed guessing encoding against empty body (with chardet). (and chardet package prints "DEBUG" level log "no data received!" and "no probers hit minimum threshold")
This failing encoding guess is harmless but time consuming.
To Reproduce
Steps to reproduce the behavior:
- Configure logging level to output "DEBUG" level messages.
- Prepare write permitted blob URL on Azure Blob Storage.
- Call
azure.storage.blob.aio.BlobClient#stage_blockand await it. chardetlogger prints "no data received!" and "no probers hit minimum threshold".
Expected behavior
If encoding is specified, respect it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Azure.CoreClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.bugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK team
