tornadoweb / tornadoweb/tornado
self.request.get_ssl_certificate() getting error in WebSocketHandler
Open
Nobody has claimed this yet.
websocket
- Dominant language
- Python
- Stars
- 22.2k
- Forks
- 5.6k
- Avg merge
- 3h 42m
- Merged PRs (30d)
- 16
Description
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/tornado/websocket.py", line 954, in _accept_connection
open_result = handler.open(*handler.open_args, **handler.open_kwargs)
File "/code/dpopgateway/dpopgateway/dpop_views/dpop_server_main.py", line 36, in open
print(self.request.get_ssl_certificate())
File "/usr/local/lib/python3.6/dist-packages/tornado/httputil.py", line 445, in get_ssl_certificate
return self.connection.stream.socket.getpeercert( # type: ignore
AttributeError: 'NoneType' object has no attribute 'socket'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tornado/websocket.py at _accept_connection and tornado/httputil.py at get_ssl_certificate, then trace how the WebSocket request's connection stream is initialized. Reproduce the reported WebSocketHandler call, but first clarify the expected certificate behavior because the issue does not specify what should happen instead of the traceback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100