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

pkg/api/client.RootCert should use the provided *http.Client #501

Closed
imjasonh opened this issue Apr 1, 2022 · 3 comments · Fixed by #502
Closed

pkg/api/client.RootCert should use the provided *http.Client #501

imjasonh opened this issue Apr 1, 2022 · 3 comments · Fixed by #502
Labels
bug Something isn't working

Comments

@imjasonh
Copy link
Member

imjasonh commented Apr 1, 2022

Description

RootCert calls http.Get, which uses the default client:

resp, err := http.Get(endpoint.String())

Contrast with SigningCert, which uses the provided *http.Client if one was provided:

resp, err := c.client.Do(req)

This means that if WithTimeout or WithUserAgent are called, these will be ignored when fetching the root cert. If future client options are added, these would likely also be ignored.

If this is unintentional, I can send a PR to fix it.

@imjasonh imjasonh added the bug Something isn't working label Apr 1, 2022
@imjasonh
Copy link
Member Author

imjasonh commented Apr 1, 2022

Looks like it was added in #290 cc @vaikas

@vaikas
Copy link
Contributor

vaikas commented Apr 1, 2022

Oops, great call @imjasonh thanks! Are you sending a PR or do you want me to clean up my own messes? :)

@imjasonh
Copy link
Member Author

imjasonh commented Apr 1, 2022

Oops, great call @imjasonh thanks! Are you sending a PR or do you want me to clean up my own messes? :)

I got you: #502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants