Opened 14 years ago
Closed 14 years ago
#17555 closed Bug (fixed)
LocaleMiddleware wrongly redirects paths without trailing slash
| Reported by: | Vlada Macek | Owned by: | nobody |
|---|---|---|---|
| Component: | Internationalization | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
On requests with path like '/en', the translation.get_language_from_path() does a bad redirection to, say, '/cs/en' in case the browser asks for Czech language.
I think the language-code detection regexp should respect ending slash-less paths.
Patch attached.
Attachments (3)
Change History (9)
by , 14 years ago
| Attachment: | language-code-prefix-ending.patch added |
|---|
comment:1 by , 14 years ago
comment:2 by , 14 years ago
| Needs tests: | set |
|---|
comment:3 by , 14 years ago
| Version: | 1.3 → SVN |
|---|
comment:4 by , 14 years ago
| Needs tests: | unset |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:5 by , 14 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Note:
See TracTickets
for help on using tickets.
Replying to Tuttle:
It causes it, not that it does it, of course.