h2 icon indicating copy to clipboard operation
h2 copied to clipboard

Eventlet example, use hyper client connect raise openssl error

Open Weilor opened this issue 6 years ago • 0 comments

exception is:

Traceback (most recent call last):
  File "/Users/user/.pyenv/versions/h2server/lib/python3.6/site-packages/eventlet/greenpool.py", line 88, in _spawn_n_impl
    func(*args, **kwargs)
  File "origin_eventlet.py", line 31, in run_forever
    self.sock.sendall(self.conn.data_to_send())
  File "/Users/user/.pyenv/versions/h2server/lib/python3.6/site-packages/eventlet/green/OpenSSL/SSL.py", line 101, in sendall
    tail = self.send(data)
  File "/Users/user/.pyenv/versions/h2server/lib/python3.6/site-packages/eventlet/green/OpenSSL/SSL.py", line 81, in write
    return self.fd.write(data)
  File "/Users/user/.pyenv/versions/h2server/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1256, in send
    self._raise_ssl_error(self._ssl, result)
  File "/Users/user/.pyenv/versions/h2server/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1174, in _raise_ssl_error
    _raise_current_error()
  File "/Users/user/.pyenv/versions/h2server/lib/python3.6/site-packages/OpenSSL/_util.py", line 48, in exception_from_error_queue
    raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_record', 'http request')]

client code:

from hyper import HTTPConnection
c = HTTPConnection('localhost:8090')
first = c.request('GET', '/', headers={'key': 'value'})

Weilor avatar Apr 02 '18 08:04 Weilor