PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Validate » Validate » Bug #7864

uris rejected if subdomain contains underscores

Details

Submitted2006-06-11 14:50 UTC
Fromtaak at php dot net
Assignedamir
StatusClosed
PackageValidate
PHP VersionIrrelevant
Roadmaps0.8.0

Comments

[2006-06-11 14:50 UTC] taak at php dot net

Description:
------------
Validate::uri rejects urls that have underscores in the subdomain.

Examples:

http://cleveland_diary.blogspot.com

http://dear_raed.blogspot.com/

http://sarnadle_vector.livejournal.com

Underscores in the subdomain may or may not be standards-compliant... if not, perhaps there should be some mode under which it is accepted.

[2006-06-13 10:00 UTC] makler at php dot net

Underscore in domain names are against RFC rules.IMHO the validation package should not accept domains with underscore. Subdomain is just another part of a domain.
A few URLs in the world that breaks the RFC rules, is not the good reason for allowing it. That sites should change their names.
Later BIND versions are fascist about "funny" characters in domain names.

[2006-07-09 08:41 UTC] amir at php dot net

"_" (literal) is an unreserved character in URI and allowed (in both RFC 2396 and this package) but it's usage in domain name part is against RFC 1034 (& 1035).
I see actually no reason for being against RFC just for some blog service provider.

So seems it's an "Expected behavior".

Feedbacks?

[2006-07-09 16:28 UTC] taak at php dot net

It's up to the maintainers of this package what they want to do, but the number of domains out there like this is not insignificant. I have 102 examples in my smallish database, for example.

There may be situations in which you would want to reject these urls, however there are many situations in which you would not. Of course this needn't/shouldn't be the default behavior.

[2006-07-25 09:01 UTC] amir at php dot net

Thank you for taking the time to write to us, but this is not
a bug.

As I said earlier there's actually no reason (or at least enough) to being against RFC.