Fix parsing http_proxy environment.#217
Merged
temoto merged 1 commit intohttplib2:masterfrom Feb 2, 2022
Merged
Conversation
Member
|
Thank you. It's nice and clean now. This is exactly what would merge #206. Can get rid of single use variables now. url = urlparse.urlparse(url)
proxy_type = 3 # socks.PROXY_TYPE_HTTP
pi = ProxyInfo(
proxy_type=proxy_type,
proxy_host=url.hostname,
proxy_port=url.port or dict(https=443, http=80)[method],
proxy_user=url.username or None,
proxy_pass=url.password or None,
proxy_headers=None,
)If you agree, i can apply it myself. |
Member
|
flake8: tests/test_proxy.py:49:1: E302 expected 2 blank lines, found 1 |
Parsing proxy was breaking when proxy URL was set to ipv6 address. There was also weird handling of proxy without a password. We should rely on parsing those fields in urllib which is present in all supported versions.
Contributor
Author
|
Thanks. I have amended these fixes. |
Member
|
@kramarz thank you very much, released in 0.20.4 |
NickGoog
added a commit
to GoogleCloudPlatform/gsutil
that referenced
this pull request
Feb 24, 2022
…0.20.4 (#1468) * httplib2 was wrongly parsing `bar` in `bar@host` as password before v0.20.4 obviously wrong because there is no username before that password fixed by: httplib2/httplib2#217 upstream issue: httplib2/httplib2#218 * Bumb httplib2 submodule version to latest and add new httplib2 dependency. Was careful to choose a pyparsing version that supports Py3.5 and httplib2 version requirements, by checking out the "pyparsing_2.4.x" branch. https://pypi.org/project/pyparsing/2.4.7/ https://github.com/httplib2/httplib2/blob/master/requirements.txt Co-authored-by: NickGoog <hartunian@google.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Mar 7, 2022
Changelog: ========= proxy: support proxy urls with ipv6 address httplib2/httplib2#217 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Mar 7, 2022
Changelog: ========= proxy: support proxy urls with ipv6 address httplib2/httplib2#217 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Mar 7, 2022
Changelog: ========= proxy: support proxy urls with ipv6 address httplib2/httplib2#217 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Mar 8, 2022
Changelog: ========= proxy: support proxy urls with ipv6 address httplib2/httplib2#217 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Mar 8, 2022
Changelog: ========= proxy: support proxy urls with ipv6 address httplib2/httplib2#217 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this pull request
Mar 9, 2022
Changelog: ========= proxy: support proxy urls with ipv6 address httplib2/httplib2#217 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
halstead
pushed a commit
to openembedded/meta-openembedded
that referenced
this pull request
Mar 9, 2022
Changelog: ========= proxy: support proxy urls with ipv6 address httplib2/httplib2#217 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parsing proxy was breaking when proxy URL was set to ipv6 address. There
was also weird handling of proxy without a password. We should rely on
parsing those fields in urllib which is present in all supported
versions.