|
4 | 4 | import re |
5 | 5 | import argparse |
6 | 6 | import os |
7 | | -try: |
8 | | - from future.backports.http.cookies import SimpleCookie |
9 | | -except: |
10 | | - from Cookie import SimpleCookie |
| 7 | + |
| 8 | +from six.moves.http_cookies import SimpleCookie |
11 | 9 | import six |
12 | 10 |
|
13 | 11 | from saml2.extension.pefim import SPCertEnc |
@@ -172,7 +170,6 @@ def __init__(self): |
172 | 170 |
|
173 | 171 | def get_user(self, environ): |
174 | 172 | cookie = environ.get("HTTP_COOKIE", '') |
175 | | - cookie = cookie.decode("UTF-8") |
176 | 173 | logger.debug("Cookie: %s", cookie) |
177 | 174 | if cookie: |
178 | 175 | cookie_obj = SimpleCookie(cookie) |
@@ -847,7 +844,6 @@ def application(environ, start_response): |
847 | 844 |
|
848 | 845 | if __name__ == '__main__': |
849 | 846 | from cherrypy import wsgiserver |
850 | | - from cherrypy.wsgiserver import ssl_pyopenssl |
851 | 847 |
|
852 | 848 | _parser = argparse.ArgumentParser() |
853 | 849 | _parser.add_argument('-d', dest='debug', action='store_true', |
@@ -907,6 +903,7 @@ def application(environ, start_response): |
907 | 903 |
|
908 | 904 | _https = "" |
909 | 905 | if service_conf.HTTPS: |
| 906 | + from cherrypy.wsgiserver import ssl_pyopenssl |
910 | 907 | SRV.ssl_adapter = ssl_pyopenssl.pyOpenSSLAdapter(SERVER_CERT, |
911 | 908 | SERVER_KEY, CERT_CHAIN) |
912 | 909 | _https = " using SSL/TLS" |
|
0 commit comments