-
Notifications
You must be signed in to change notification settings - Fork 56
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
Give an error for addresses lacking a hostname #408
base: master
Are you sure you want to change the base?
Conversation
5c5355c
to
104d984
Compare
This is an alternate solution to #407. (The commit message was tweaked accordingly.) |
Examples of message:
|
Ok, this adds a more helpful error message, but doesn't solve the problem that Can you write a |
Oh! Oops, ok, I get it now. Will do. |
0f59685
to
a36347f
Compare
Updated. I also added a check for |
a36347f
to
a98d619
Compare
a98d619
to
dd3ef01
Compare
A source or destination address of the form ":1234" is parsed as a hostname of "" which is guaranteed to never work. While we don't want to give special error messages for all possible invalid addresses, this particular case can easily be produced from a broken shell script (with a hostname variable accidentally not set), so it's worth having a special error message. Suggested by: Ross Richardson
We want to check that the addresses are syntactically valid before spiped daemonizes. It's not strictly necessary for spipe, but we might as well check it so that we can produce a usage() if necessary. Suggested by: Ross Richardson
A source or destination address of the form ":1234" is parsed as a hostname of "" which is guaranteed to never work. While we don't want to give special error messages for all possible invalid addresses, this particular case can easily be produced from a broken shell script (with a hostname variable accidentally not set), so it's worth having a special error message.
Suggested by: Ross Richardson