Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
df9e3ee8
Commit
df9e3ee8
authored
Mar 17, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unverified SSL errors for test__example_servers on newer python.
parent
37c6edc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
greentest/test___example_servers.py
greentest/test___example_servers.py
+11
-1
No files found.
greentest/test___example_servers.py
View file @
df9e3ee8
...
...
@@ -8,16 +8,21 @@ else:
import
util
import
ssl
class
Test_wsgiserver
(
util
.
TestServer
):
server
=
'wsgiserver.py'
URL
=
'http://127.0.0.1:8088'
not_found_message
=
'<h1>Not Found</h1>'
ssl_ctx
=
None
def
read
(
self
,
path
=
'/'
):
url
=
self
.
URL
+
path
try
:
response
=
urllib2
.
urlopen
(
url
)
if
self
.
ssl_ctx
is
not
None
:
response
=
urllib2
.
urlopen
(
url
,
context
=
self
.
ssl_ctx
)
else
:
response
=
urllib2
.
urlopen
(
url
)
except
urllib2
.
HTTPError
:
response
=
sys
.
exc_info
()[
1
]
return
'%s %s'
%
(
response
.
code
,
response
.
msg
),
response
.
read
()
...
...
@@ -37,6 +42,11 @@ class Test_wsgiserver_ssl(Test_wsgiserver):
server
=
'wsgiserver_ssl.py'
URL
=
'https://127.0.0.1:8443'
if
hasattr
(
ssl
,
'_create_unverified_context'
):
# Disable verification for our self-signed cert
# on Python >= 2.7.9 and 3.4
ssl_ctx
=
ssl
.
_create_unverified_context
()
class
Test_webproxy
(
Test_wsgiserver
):
server
=
'webproxy.py'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment