-
Notifications
You must be signed in to change notification settings - Fork 48
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 http datastore fqdn address #1005
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @shjala ! Could you please add comment from your commit to the change, so it won't be gone if we rewrite commit? I think it's a useful comment for people :)
I'm not sure what you mean, this is the commit message, should I add more to it?
|
f885f75
to
a81166f
Compare
@uncleDecart got it, added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please align the logic here.
pkg/expect/http.go
Outdated
// In case the http datastore address has a port number, | ||
// the datastore address should contain both the hostname and the port. | ||
if u.Port() != "" { | ||
ds.Fqdn = fmt.Sprintf("%s:%s", ds.Fqdn, u.Port()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use u.Host
instead in both cases (as full host:port notation), looks like it contains the port and u.Port()
just extracts it from u.Host
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
In case the http datastore address has a port number, the datastore address should contain both the hostname and the port. Signed-off-by: Shahriyar Jalayeri <[email protected]>
a81166f
to
39ec469
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Nice catch.
In case the http datastore address has a port number, the datastore address should contain both the hostname and the port.