Message10515
When executing below code, there is one exception thrown when visiting below Https Server in web browser. The code can run on Python 2.7.
########## code start
import BaseHTTPServer, SimpleHTTPServer
import ssl
httpd = BaseHTTPServer.HTTPServer(('localhost', 4433), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket(httpd.socket,
certfile='server.crt',
server_side=True,
keyfile='server.key'
)
httpd.serve_forever()
###########code end
The stack trace:
File "/Users/kaneg/jython2.7/Lib/SocketServer.py", line 238, in serve_forever
self._handle_request_noblock()
File "/Users/kaneg/jython2.7/Lib/SocketServer.py", line 290, in _handle_request_noblock
request, client_address = self.get_request()
File "/Users/kaneg/jython2.7/Lib/SocketServer.py", line 290, in _handle_request_noblock
request, client_address = self.get_request()
File "/Users/kaneg/jython2.7/Lib/SocketServer.py", line 471, in get_request
return self.socket.accept()
AttributeError: 'SSLSocket' object has no attribute 'accept'
According to code in ssl.py, there is no accept method in SSLSocket of Jython2.7, but in Python2.7.
Is it a limitation or a bug? |
|
Date |
User |
Action |
Args |
2015-12-06 06:16:54 | kaneg | set | recipients:
+ kaneg |
2015-12-06 06:16:54 | kaneg | set | messageid: <1449382614.8.0.70021393113.issue2439@psf.upfronthosting.co.za> |
2015-12-06 06:16:54 | kaneg | link | issue2439 messages |
2015-12-06 06:16:53 | kaneg | create | |
|