#9224: request.get_full_path() raise string encoding error when user submit a non- ascii url. ---------------------------+------------------------------------------------ Reporter: flytwokites | Owner: nobody Status: new | Milestone: Component: HTTP handling | Version: 1.0 Keywords: get_full_path | Stage: Unreviewed Has_patch: 0 | ---------------------------+------------------------------------------------ When a user try submit a url with utf-8 characters like "http://www.django.com/submit/?url=xxx&title=中文字符", and app uses request.get_full_path(), an error will raise, and admins will receive a 500 error email. In modpython, the implementation code is: {{{ def get_full_path(self): return '%s%s' % (self.path, self._req.args and ('?' + self._req.args) or '') }}} and currently i fix it use this code: {{{ def get_full_path(self): from django.utils.encoding import iri_to_uri return '%s%s' % (smart_str(self.path), self._req.args and ('?' + iri_to_uri(self._req.args)) or '') }}}
-- Ticket URL: <http://code.djangoproject.com/ticket/9224> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
