#12186 closed (duplicate)
HttpResponseRedirect(request.get_full_path()) fails with UnicodeEncodeError for international URL
| Reported by: | Oldřich Jedlička | Owned by: | nobody |
|---|---|---|---|
| Component: | Uncategorized | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The problem is in get_full_path() when the path component contains unicode data. The path (unicode) cannot be used in the HttpResponseRedirect. The iri_to_uri should be used for the whole string I think. The simplest example that triggers the problem is this (when the URL contains international characters)
def view(request):
return HttpResponseRedirect(request.get_full_path())
Attachments (1)
Change History (3)
by , 16 years ago
| Attachment: | django-get_full_path.patch added |
|---|
comment:1 by , 16 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Dupe of ##11522. Please search trac before filing a new ticket.
Note:
See TracTickets
for help on using tickets.
Proposed fix of the problem