hyper
hyper copied to clipboard
HTTPUpgrade is not working
In common.connection.HTTPConnection.get_response (), there is no creating new request.
I think it should be added 3 or 4 lines:
def request(self, method, url, body=None, headers=None):
+self._last_requested_args = (method, url, body, headers)
...
def get_response (self):
...
self._conn._connect_upgrade(e.sock)
+stream_id = self._conn.request (*self._last_requested_args)
+return self._conn.get_response (stream_id)
We shouldn't need to create a new request: the _connect_upgrade should be sufficient. What problem are you bumping into exactly? Can you provide a traceback, please?
Sorry, I misunderstood protocol specification. Your comment is very helpful to me enabling HTTP/2 on my server program. Thank you.