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

add --user to check-http #297

Merged
merged 1 commit into from
Sep 17, 2019
Merged

add --user to check-http #297

merged 1 commit into from
Sep 17, 2019

Conversation

lausser
Copy link
Contributor

@lausser lausser commented Aug 6, 2019

Just a small improvement so you can check a website which requires basic auth. (i called it "--user" because that's how this parameter is called in curl)

@susisu
Copy link
Contributor

susisu commented Aug 19, 2019

Hi, thank you for your contribution!

You can also specify user info in urls like https://user:[email protected]/, is this not enough?

@lausser
Copy link
Contributor Author

lausser commented Aug 19, 2019 via email

@@ -32,6 +32,7 @@ type checkHTTPOpts struct {
MaxRedirects int `long:"max-redirects" description:"Maximum number of redirects followed" default:"10"`
ConnectTos []string `long:"connect-to" value-name:"HOST1:PORT1:HOST2:PORT2" description:"Request to HOST2:PORT2 instead of HOST1:PORT1"`
Proxy string `short:"x" long:"proxy" value-name:"[PROTOCOL://][USER:PASS@]HOST[:PORT]" description:"Use the specified proxy. PROTOCOL's default is http, and PORT's default is 1080."`
BasicAuth string `long:"user" description:"<user:password> Server user and password."`
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend using value-name tag, like value-name:"USER[:PASSWORD]".

@susisu
Copy link
Contributor

susisu commented Sep 5, 2019

@lausser Can you fix #297 (comment), please?

@lausser
Copy link
Contributor Author

lausser commented Sep 14, 2019

Finally, after an hour of commits, rebase, squash and all that can go wrong :-))

Copy link
Contributor

@susisu susisu left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@susisu susisu merged commit 7ab1e0f into mackerelio:master Sep 17, 2019
@susisu susisu mentioned this pull request Oct 2, 2019
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.

2 participants