Message10515

Author kaneg
Recipients kaneg
Date 2015-12-06.06:16:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1449382614.8.0.70021393113.issue2439@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2015-12-06 06:16:54kanegsetrecipients: + kaneg
2015-12-06 06:16:54kanegsetmessageid: <1449382614.8.0.70021393113.issue2439@psf.upfronthosting.co.za>
2015-12-06 06:16:54kaneglinkissue2439 messages
2015-12-06 06:16:53kanegcreate