Opened 6 years ago

Last modified 6 years ago

#28883 closed Cleanup/optimization

uuid URL path converter failed if UUID is anything but lowercase — at Version 1

Reported by: Jean-Daniel Owned by: nobody
Component: Documentation Version: 2.0
Severity: Normal Keywords: uuid
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

According to RFC4122:

Each field is treated as an integer and has its value printed as a zero-filled hexadecimal digit string with the most significant digit first.
The hexadecimal values "a" through "f" are output as lower case characters and are case insensitive on input.

Actually, when trying to parse uuid using the url dispatcher's "uuid path convert", it returns URL not found for anything but lower case UUID, which is surprising as they should be case insensitive.

The uuid path converter should be updated to support upper, lower or even mixed case UUID, as long as they are properly formatted.

Change History (1)

comment:1 by Tim Graham, 6 years ago

Description: modified (diff)

I'm not sure this change is desirable, at least for everyone, as that would permit many URLs (all case combinations) to map to the same page. A django-developers discussion didn't yield any objections to removing support for case-insensitive URLs (via (?i) in URL patterns).

Also, with the current architecture URL converters, I don't think it's possible to implement this.

Note: See TracTickets for help on using tickets.
Back to Top