Last active
January 17, 2016 20:28
-
-
Save nickmbailey/f80ad965a048c1d4df22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import httplib | |
for i in range(20): | |
conn = httplib.HTTPSConnection("www.python.org") | |
conn.request("GET", "/") | |
r1 = conn.getresponse() | |
print r1.status, r1.reason | |
print i |
An example run:
automaton@atestssl-c862026:~/ripcord/opscenterd$ java -jar jython-standalone-2.7.1b2.jar netty-ssl-bug.py
200 OK
0
200 OK
1
Traceback (most recent call last):
File "netty-ssl-bug.py", line 4, in <module>
conn.request("GET", "/")
File "/home/automaton/ripcord/opscenterd/jython-standalone-2.7.1b2.jar/Lib/httplib.py", line 1001, in request
File "/home/automaton/ripcord/opscenterd/jython-standalone-2.7.1b2.jar/Lib/httplib.py", line 1035, in _send_request
File "/home/automaton/ripcord/opscenterd/jython-standalone-2.7.1b2.jar/Lib/httplib.py", line 997, in endheaders
File "/home/automaton/ripcord/opscenterd/jython-standalone-2.7.1b2.jar/Lib/httplib.py", line 850, in _send_output
File "/home/automaton/ripcord/opscenterd/jython-standalone-2.7.1b2.jar/Lib/httplib.py", line 812, in send
File "/home/automaton/ripcord/opscenterd/jython-standalone-2.7.1b2.jar/Lib/httplib.py", line 1204, in connect
File "/home/automaton/ripcord/opscenterd/jython-standalone-2.7.1b2.jar/Lib/_socket.py", line 357, in handle_exception
File "/home/automaton/ripcord/opscenterd/jython-standalone-2.7.1b2.jar/Lib/_socket.py", line 357, in handle_exception
File "/home/automaton/ripcord/opscenterd/jython-standalone-2.7.1b2.jar/Lib/ssl.py", line 320, in wrap_socket
File "/home/automaton/ripcord/opscenterd/jython-standalone-2.7.1b2.jar/Lib/ssl.py", line 147, in __init__
File "/home/automaton/ripcord/opscenterd/jython-standalone-2.7.1b2.jar/Lib/ssl.py", line 196, in do_handshake
_socket.SSLError: [Errno 1] Unmapped exception: java.lang.NullPointerException
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Demonstrates a netty ssl bug when run through jython 2.7.1b2. If you download the jython standalone jar, you can run this script to see the bug (I've only seen it occur on ubuntu 14.04):