-
Notifications
You must be signed in to change notification settings - Fork 183
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
FIX: Remove HEAD -> GET request swap workaround #699
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #699 +/- ##
==========================================
+ Coverage 72.14% 72.16% +0.01%
==========================================
Files 89 89
Lines 7945 7943 -2
==========================================
Hits 5732 5732
+ Misses 2213 2211 -2 ☔ View full report in Codecov by Sentry. |
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.
Do we need to lock aiohttp >= a certain version as part of the PR?
await response.release() | ||
raw_data = "" | ||
raw_data = "" # HEAD method has no response body |
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.
Should be None
? There other other places where we assign things to ""
where in fact we mean none I believe, too.
@@ -246,12 +246,8 @@ async def perform_request( | |||
else: | |||
query_string = "" | |||
|
|||
# There is a bug in aiohttp that disables the re-use | |||
# of the connection in the pool when method=HEAD. | |||
# See: aio-libs/aiohttp#1769 | |||
is_head = False |
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 believe this is no longer needed as we only reuse it once, maybe just check the verb where it's needed?
Is there a way to write a test for this, too? Something that fails without this change? |
|
Disregard the previous comment. To resolve this issue #715 , we're planning to lock aiohttp to >=3.9.2,<4. Thus, simply removing the workaround should suffice." |
Hello @vcastane , Could you please take a look at finishing this PR when you have a moment? If you need any help, let us know. Thanks a lot! |
Finished this in #794. |
Description
Remove a workaround replacing HEAD requests with GET requests for async requests.
This workaround is no longer needed after the underlying bug was fixed in aio-libs/aiohttp#5012
Issues Resolved
Partially resolves #698
The rest of the issue is user (my) error.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.