Skip Menu |

This queue is for tickets about the Regexp-Common CPAN distribution.

Report information
The Basics
Id: 55547
Status: rejected
Priority: 0/
Queue: Regexp-Common

People
Owner: Nobody in particular
Requestors: scop [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2010010201
Fixed in: (no value)



Subject: URI regexp should be case insensitive wrt. scheme
The URI regexps seem to demand the URI scheme to be in lowercase, but RFC 2396 says: http://tools.ietf.org/html/rfc2396#section-3.1 "For resiliency, programs interpreting URI should treat upper case letters as equivalent to lower case in scheme names (e.g., allow "HTTP" as well as "http")." ...so I suggest making the scheme matching case insensitive. This is trivial to work around in code using Regexp-Common, but I think the default behavior should Just Work.
Regexp::Common is to validate things, hence, it's strict. The RFC says lowercase, so the regexp only accepts lowercase.
Also note, that if you really want lowercase, you can use: $RE {URI} {HTTP} {-scheme => qr/(?i:http)/}
On Sun Apr 17 10:32:25 2011, ABIGAIL wrote: Show quoted text
> Regexp::Common is to validate things, hence, it's strict. The RFC says > lowercase, so the regexp only accepts lowercase.
Oh, I think that's a very bad call. The RFC actually says applications *should* accept uppercase and lowercase scheme names and Regexp::Common behaved directly against that by default the last time I checked, so Regexp::Common is imposing additional restrictions over the relevant specification. That's not being strict, nor being "to validate things", it's something that in my opinion would deserve a loud and clear note in the documentation (don't know a good word for it).