On Sat, 31 Aug 2013 15:45:38 +0200, Christian Boos <[email protected]> wrote : > > I had to make the following patch to make Trac work on my Debian > > Testing. > > What kind of error did you have? Did it correspond to the HTTPNotFound > error that should be raised in case PATH_INFO doesn't have an UTF-8 > encoding? Or was it something else? > > More information about the URL, the web browser and the web server > would help put this error in perspective. >
I used Trac through WSGI (through dispatch_request) and the PATH_INFO I was providing was already a Unicode string. Hence the error when trying to convert to Unicode string. > > I don't know if the patch is correct though, as I have blindly made > > the change without really understanding. > > No, likely not. The PATH_INFO should come in being utf-8 encoded, and > if that's not the case it's better to trap the error early rather than > force the conversion to succeed and have a failure later, when the > source of the error will be harder to figure out. > Ok I understand. I changed the provided PATH_INFO to come as a string utf-8 encoded instead and everything works as it should be. Sorry for the incorrect patch and thanks for the insight ! -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/trac-dev. For more options, visit https://groups.google.com/groups/opt_out.
