-
Notifications
You must be signed in to change notification settings - Fork 8
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
Warn (not error) on content type, by default #227
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #227 +/- ##
==========================================
- Coverage 84.15% 83.79% -0.37%
==========================================
Files 16 16
Lines 1073 1080 +7
==========================================
+ Hits 903 905 +2
- Misses 170 175 +5 ☔ View full report in Codecov by Sentry. |
Thanks for this! I'll be able to test it out later next week |
👍 for this change! I recently encountered the issue where Here's an example in import asyncio
from aiohttp import ClientSession
async def fetch_image():
url = "https://..."
async with ClientSession() as session:
async with session.get(url) as response:
print(response.content_type)
print(response.headers['Content-Type'])
# Run the async function using asyncio
if __name__ == "__main__":
asyncio.run(fetch_image()) Output:$ python test.py
image/tiff
image/tiff; application=geotiff |
@drnextgis thanks! I tried to be permissive about |
Thank you! I can confirm that the warning is triggered when the content type check fails (tested via CLI):
I can also confirm that it no longer fails with |
Related issues and pull requests
Description
@scottyhq any chance you have time to check this one out? I don't have a content_type-non-complaint server at the ready.