-
Notifications
You must be signed in to change notification settings - Fork 267
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
Avoid host validate when is omitted #369
Avoid host validate when is omitted #369
Conversation
@@ -74,6 +74,9 @@ module CharacterClasses | |||
"ldap" => 389, | |||
"prospero" => 1525 | |||
} | |||
## | |||
# @@avoid_host_omitted is to avoid host validate when is set to be omitted | |||
@@avoid_host_omitted = true |
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.
Why add this?
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.
Because, when the method "omit" is called, the host is nullified, and then call the method "validate" the error InvalidURIError, "Hostname not supplied:
. So I don't like this approach to use @@ in this case, but I don't see any solutions to solve this problem without a huge refactory. Do you have any idea?
@@ -1033,6 +1033,19 @@ def to_s | |||
end | |||
end |
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.
Fix issue #363