ChristianLutzCL / ChristianLutzCL/ServerMonitor
Got 500 and SSLError on some urls
- Dominant language
- CSS
- Stars
- 62
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
If try to check some urls got a Internal service error (500)
Following deeper in code I found that cause in
requests.exceptions.SSLError
**To Reproduce**
Steps to reproduce the behavior:
1. Paste 'https://www.old.reddit.com' to textbox
2. Click on 'Check'
3. If enabled Debug in run.py, can catch exception via console:
`requests.head(url, timeout=2, stream=True, allow_redirects=True)`
4. See error
`
File "/Users/trx/.virtualenvs/servermon/lib/python3.7/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
`
`
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.old.reddit.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError("hostname 'www.old.reddit.com' doesn't match either of '*.reddit.com', 'reddit.com', '*.redditmedia.com', 'redditmedia.com', '*.redd.it', 'redd.it', 'www.redditstatic.com', 'i.reddituploads.com', '*.thumbs.redditmedia.com', 'www.redditinc.com', 'redditinc.com'")))`
`
**Expected behavior**
Should show real status, maybe better add a warning about SSL, or ignore it
**Desktop (please complete the following information):**
- OS: Mac OS X Mojave
- Browser Firefox
- Version 69.0
**Additional context**
Need wrap exception or do workaround. I'm don't sure what is better. Should programm check SSL or not?
Possible ignore it:
https://stackoverflow.com/questions/10667960/python-requests-throwing-sslerror
Example:
`
requests.get('https://kennethreitz.com', verify=False)
`
PS: I can take to work this issue after your decide what need to do with this error
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.