Changeset 1448
- Timestamp:
- 11/27/06 13:13:50
- Files:
-
- trunk/cherrypy/_cpwsgiserver.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cpwsgiserver.py
r1446 r1448 791 791 # X509Name objects don't seem to have a way to get the 792 792 # complete DN string. Use str() and slice it instead. 793 dn = str(dn)[18:-2]793 dnstr = str(dn)[18:-2] 794 794 795 795 wsgikey = 'SSL_SERVER_%s_DN' % prefix 796 self.ssl_environ[wsgikey] = dn 796 self.ssl_environ[wsgikey] = dnstr 797 797 798 for atom in dn.split("/"): 799 if atom: 800 key, value = atom.split("=", 1) 798 # The DN should be of the form: /k1=v1/k2=v2, but we must allow 799 # for any value to contain slashes itself (in a URL). 800 while dnstr: 801 dnstr, value = dnstr.rsplit("=", 1) 802 dnstr, key = dnstr.rsplit("/", 1) 803 if key and value: 801 804 wsgikey = 'SSL_SERVER_%s_DN_%s' % (prefix, key) 802 805 self.ssl_environ[wsgikey] = value

