feat: ✨ test for ACME file over SSL, + more logging#1342
Closed
techieshark wants to merge 1 commit into
Closed
Conversation
Author
|
I think we'd also need to modify this file: to add |
Member
|
Looks good overall! re: adding 443 to 🤔 would we need the |
swalkinshaw
reviewed
Feb 15, 2022
Comment on lines
+112
to
+119
| if int(status) != 200 and bool(ssl) == True: | ||
| failed_hosts.append(result) | ||
| # Try again, this time over SSL | ||
| result = get_status(host, 443, path, file) | ||
| status = result['status'] | ||
|
|
||
| if int(status) != 200: | ||
| failed_hosts.append(host) | ||
| failed_hosts.append(result) |
Member
There was a problem hiding this comment.
This reads better I think?
if int(status) != 200:
failed_hosts.append(result)
if bool(ssl) == True:
# Try again, this time over SSL
result = get_status(host, 443, path, file)
status = result['status']
Member
There was a problem hiding this comment.
Sorry just realized this comment had been pending for over a month and I forgot to submit 😓
Member
|
@techieshark are you still interested in finishing this? I can take it over if not. |
Member
|
Closing this since it won't be compatible with #1310 |
Author
|
Just finally getting back to some Trellis work… thanks @swalkinshaw for that readability suggestion; I've updated my local code with that and will use that internally until #1310 is released. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1340
Consider this a rough initial PR, ready for review/discussion. I'm happy to make changes as needed.
Things to consider:
sslconfig option (maybe we just recognize a potential 301 HTTP->HTTPS redirect and follow it?get_statusfunction, but now that it returns more than just the HTTP status, perhaps I shouldExample output
Below is an example where I've just changed the filename to force what happens when the file is inaccessible
Below is an example where
example.com(some good host) has a typo likeexample.comuu(extra 'uu') so we see the "-1" status in the details and the "Name or service not known" in the JSON holding the full details.