- 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_block and await it.
chardet logger prints "no data received!" and "no probers hit minimum threshold".
Expected behavior
If encoding is specified, respect it.
Screenshots

Describe the bug
AioHttpTransportResponse'stextmethod ignoresencodingparameter, if it is notNone.When calling
azure.storage.blob.aio.BlobClient'sstage_blockmethod, its corresponding response "201 created" with empty body.AioHttpTransportResponse#textmethod ignores request's "uft-8" encoding and get failed guessing encoding against empty body (withchardet). (andchardetpackage 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:
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.
Screenshots
