danwent / Perspectives-Server

network notary implementation for the Perspectives project
http://perspectives-project.org
GNU General Public License v3.0
50 stars 13 forks source link

Handle unicode hostnames #39

Open daveschaefer opened 10 years ago

daveschaefer commented 10 years ago

CherryPy currently has an error if the service_id contains unicode, such as 'Bücher.de'.

File "C:\Python27\lib\site-packages\cherrypy_cprequest.py", line 656, in resp ond response.body = self.handler() File "C:\Python27\lib\site-packages\cherrypy\lib\encoding.py", line 188, in call self.body = self.oldhandler(_args, _kwargs) File "C:\Python27\lib\site-packages\cherrypy_cpdispatch.py", line 34, in ca ll return self.callable(_self.args, _self.kwargs) File "notary_http.py", line 431, in index return self.get_xml(host, port, service_type) File "notary_http.py", line 273, in get_xml service = str(host + ":" + port + "," + service_type) UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 0: ordinal not in range(128)

I'm not sure what the correct action is to take.