Skip to content
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

Sync through proxy fix #1837

Merged
merged 1 commit into from Sep 4, 2020
Merged

Conversation

pavelpicka
Copy link
Contributor

Fix sync using proxy server.
Custom downloader doesn't passed proxy info.

[nocoverage]

closes: #7321
https://pulp.plan.io/issues/7321

@pulpbot
Copy link
Member

pulpbot commented Sep 4, 2020

Attached issue: https://pulp.plan.io/issues/7321

@@ -84,7 +84,7 @@ async def _run(self, extra_data=None):
else:
url = self.url

async with self.session.get(url) as response:
async with self.session.get(url, proxy=self.proxy, proxy_auth=self.proxy_auth) as response:
Copy link
Member

Choose a reason for hiding this comment

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

I see that in the core we pass auth and not proxy_auth. https://github.com/pulp/pulpcore/blob/master/pulpcore/download/http.py#L209
I'm not familiar enough to say which one is right. Should both be passed? so if proxy is set, then proxy_auth is used?

Copy link
Member

Choose a reason for hiding this comment

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

Pulpcore is doing it wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure about auth, as I followed aiohttp docs https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't use proxy_auth alone, so changing as in the core for basic http authentication

Fix sync using proxy server.
Custom downloader doesn't passed proxy info.

[nocoverage]

closes: #7321
https://pulp.plan.io/issues/7321
@dkliban dkliban merged commit 72d83d3 into pulp:master Sep 4, 2020
@pulpbot pulpbot mentioned this pull request Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants