This repository was archived by the owner on Jan 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 198
This repository was archived by the owner on Jan 13, 2021. It is now read-only.
HTTP upgrade can block #142
Copy link
Copy link
Open
Labels
Description
When running plaintext HTTP/2 upgrades on my Windows machine (Windows 7, Python 2.7.10, Hyper version 0.4.0) I hit a timeout and the following traceback:
C:\Users\Cory>hyper GET http://http2bin.org/get
Traceback (most recent call last):
File "C:\Python27\Lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\Lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Scripts\hyper.exe\__main__.py", line 9, in <module>
File "C:\Python27\lib\site-packages\hyper\cli.py", line 231, in main
data = request(args)
File "C:\Python27\lib\site-packages\hyper\cli.py", line 219, in request
response = conn.get_response()
File "C:\Python27\lib\site-packages\hyper\common\connection.py", line 114, in
get_response
return self._conn.get_response()
File "C:\Python27\lib\site-packages\hyper\http11\connection.py", line 170, in
get_response
self._sock.fill()
File "C:\Python27\lib\site-packages\hyper\common\bufsocket.py", line 170, in f
ill
count = self._sck.recv_into(self._buffer_view[self._buffer_end:])
socket.timeout: timed out
There's one obvious problem here: we should attempt to grab a response from the buffered socket before calling fill, as we may have already encountered all the data we need from the socket. At the very least, that should change.
However, making that change doesn't resolve the problem. More work is required to diagnose this.
Reactions are currently unavailable