aiohttp
aiohttp copied to clipboard
Fix a bug in creating proxy connection of TCPConnector.
This fix addresses the issue where an AttributeError is raised when a proxy response is closed due to EOF.
What do these changes do?
Fix the issue #6239.
Are there changes in behavior for the user?
Add ClientProxyClosedError handler.
Related issue number
#6239
Checklist
- [x] I think the code is well written
- [x] Unit tests for the changes exist
- [ ] Documentation reflects the changes
- [ ] If you provide code modification, please add yourself to
CONTRIBUTORS.txt- The format is <Name> <Surname>.
- Please keep alphabetical order, the file is sorted by names.
- [x] Add a new news fragment into the
CHANGESfolder- name it
<issue_id>.<type>for example (588.bugfix) - if you don't have an
issue_idchange it to the pr id after creating the pr - ensure type is one of the following:
.feature: Signifying a new feature..bugfix: Signifying a bug fix..doc: Signifying a documentation improvement..removal: Signifying a deprecation or removal of public API..misc: A ticket has been closed, but it is not of interest to users.
- Make sure to use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files."
- name it
I believe this resolves my issue. Going to try updating my application to use this patch.
Is there something specific I can do to help? I have a bunch of test cases, but I'm not sure the best way to add them to this patch.
Is there something specific I can do to help? I have a bunch of test cases, but I'm not sure the best way to add them to this patch.
Test cases would be great. I guess just create a PR to this branch, or a separate PR to aiohttp that includes the commits on this branch.
I'm not sure how to write a test case that doesn't just exercise the entire request/response cycle with an actual endpoint.
I have a "test" here, but it relies on a 3rd party proxy server being up and having that specific configuration: https://github.com/aio-libs/aiohttp/issues/6239#issue-1044366531
Not sure how to extract out the relevant bits and make it a simple unit test.
I have some additional information here: https://github.com/aio-libs/aiohttp/issues/6239#issuecomment-1320518665
@asvetlov Would it be possible to review this?