-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix the Let's Encrypt handler by listening on a valid address #5525
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
Fix the Let's Encrypt handler by listening on a valid address #5525
Conversation
Also handle errors in the HTTP server go routine, return a fatal error when something goes wrong. Thanks to @gbl08ma for finding the actual bug Here is an example of the error handling: 2018/12/11 14:23:07 [....io/gitea/cmd/web.go:87 func1()] [E] Failed to start the Let's Encrypt handler on port 30: listen tcp 0.0.0.0:30: bind: permission denied Closes go-gitea#5280
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.
LGTM, one question though that I’m sure you’ve probably already answered but I’m on mobile so it’s hard for me to see: why remove listenAddr from LE handler and just use setting.HTTPAddr?
@techknowlogick because listenAddr already contains a port number and we need to use a different one for this handler. It's the whole point of the bug that's being fixed, see my reply on the issue. |
Ah yes, thanks for clarification 😄 |
Codecov Report
@@ Coverage Diff @@
## master #5525 +/- ##
==========================================
+ Coverage 37.58% 37.59% +0.01%
==========================================
Files 318 318
Lines 46928 46928
==========================================
+ Hits 17638 17643 +5
+ Misses 26778 26774 -4
+ Partials 2512 2511 -1
Continue to review full report at Codecov.
|
Thanks for the PR @gregkare. Now that this has been merged, would you be able to send a backport PR to the release/v1.6 branch? |
* Fix the Let's Encrypt handler by listening on a valid address Also handle errors in the HTTP server go routine, return a fatal error when something goes wrong. Thanks to @gbl08ma for finding the actual bug Here is an example of the error handling: 2018/12/11 14:23:07 [....io/gitea/cmd/web.go:87 func1()] [E] Failed to start the Let's Encrypt handler on port 30: listen tcp 0.0.0.0:30: bind: permission denied Closes go-gitea#5280 * Fix a typo
* Fix the Let's Encrypt handler by listening on a valid address Also handle errors in the HTTP server go routine, return a fatal error when something goes wrong. Thanks to @gbl08ma for finding the actual bug Here is an example of the error handling: 2018/12/11 14:23:07 [....io/gitea/cmd/web.go:87 func1()] [E] Failed to start the Let's Encrypt handler on port 30: listen tcp 0.0.0.0:30: bind: permission denied Closes #5280 * Fix a typo
Also handle errors in the HTTP server go routine, return a fatal error when something goes wrong.
Thanks to @gbl08ma for finding the actual bug
Here is an example of the error handling:
Closes #5280, replaces #5524 (pushed to the wrong organization)
Edit: This is my first Go pull request so I am open to suggestions about the error handling