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

fix issue where port is not propagated down to connection URL #971

Merged
merged 2 commits into from Jan 9, 2017

Conversation

@tonybaloney
Copy link
Contributor

@tonybaloney tonybaloney commented Jan 9, 2017

Noticed that a custom port does not roll down properly to the connection class.

Also, there is still an outstanding issue that unless the port is 443, the connection will be assumed as plain HTTP.

E.g. setting port as 9999 but Secure=True will still issue a plain HTTP connection

tonybaloney added 2 commits Jan 9, 2017
@tonybaloney
Copy link
Contributor Author

@tonybaloney tonybaloney commented Jan 9, 2017

mergey merge

@asfgit asfgit merged commit 8b3b1cb into apache:trunk Jan 9, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
asfgit pushed a commit that referenced this pull request Jan 9, 2017
@Kami
Copy link
Member

@Kami Kami commented Jan 9, 2017

Good catch.

@@ -163,9 +163,10 @@ class LibcloudConnection(LibcloudBaseConnection):
response = None

def __init__(self, host, port, **kwargs):
self.host = '{0}://{1}'.format(
self.host = '{0}://{1}{2}'.format(
'https' if port == 443 else 'http',

This comment has been minimized.

@Kami

Kami Jan 9, 2017
Member

Do we have access to secure argument here?

Because if we do, it looks like we still don't correctly handle one scenario - https on a non default port (protocol is not set correctly). For example, secure=True, port=8080 should result in https://<host>:8080.

Or am I missing something?

This comment has been minimized.

@Kami

Kami Jan 9, 2017
Member

Edit: Sorry, I should have read the description better - you already addressed this scenario there.

Also checked the code and it looks like "secure" argument is not passed to the constructor right now so yeah, we would need to change some code to make it work.

This comment has been minimized.

@tonybaloney

tonybaloney Jan 9, 2017
Author Contributor

@Kami yes, absolutely. That's a separate PR. I'm back to making one change at a time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.