Skip to content

Adding proxy header to aiohttp requests#2001

Closed
dshoe1989 wants to merge 0 commit intoaio-libs:masterfrom
dshoe1989:master
Closed

Adding proxy header to aiohttp requests#2001
dshoe1989 wants to merge 0 commit intoaio-libs:masterfrom
dshoe1989:master

Conversation

@dshoe1989
Copy link

@dshoe1989 dshoe1989 commented Jun 21, 2017

What do these changes do?

This adds a new proxy_headers param to session.request(), propagates that to the ClientRequest class, and uses it to the connector's _create_proxy_connection method.

I'm new to this so suggestions on how to test/how to update the documentation and such would be appreciated. Thanks!

Are there changes in behavior for the user?

There should not be any behavior changes as this is purely a feature addition

Related issue number

#1561

Checklist

  • I think the code is well written
  • 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.
  • Add a new entry to CHANGES.rst
    • Choose any open position to avoid merge conflicts with other PRs.
    • Add a link to the issue you are fixing (if any) using #issue_number format at the end of changelog message. Use Pull Request number if there are no issues for PR or PR covers the issue only partially.

Copy link
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are required.
Perhaps tests/test_proxy_functional.py is the best place for them.


# Merge with default headers and transform to CIMultiDict
headers = self._prepare_headers(headers)
proxy_headers = self.__prepare_headers(proxy_headers)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be _prepare_headers

@asvetlov asvetlov added this to the 2.3.0 milestone Jun 23, 2017
@cecton cecton closed this Sep 15, 2017
@cecton
Copy link
Contributor

cecton commented Sep 15, 2017

I wanted to update the PR but I managed to break it XD

The commit was cc045a5 (just in case)

@cecton cecton mentioned this pull request Sep 15, 2017
5 tasks
@cecton
Copy link
Contributor

cecton commented Sep 15, 2017

I know what I did wrong but I lost access I can't update the repo. I just made another PR.

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants