-[NSURL isEqual:] disobeys RFC's definition of equality?
-[NSURL isEqual:] disobeys RFC's definition of equality?
- Subject: -[NSURL isEqual:] disobeys RFC's definition of equality?
- From: Timothy Wood <email@hidden>
- Date: Mon, 18 Mar 2013 11:51:11 -0700
I have NSURL instances that differ only in the choice of hex digits used when URL-encoding characters in their, but NSURL -isEqual: returns NO.
For example, <http://localhost/test[> vs <http://localhost/test[>
http://tools.ietf.org/html/rfc3986#section-2.1 says
"The uppercase hexadecimal digits 'A' through 'F' are equivalent to
the lowercase digits 'a' through 'f', respectively. If two URIs
differ only in the case of hexadecimal digits used in percent-encoded
octets, they are equivalent. For consistency, URI producers and
normalizers should use uppercase hexadecimal digits for all percent-
encodings."
NSURL's documentation says that it intentionaly violates RFC 3986:
"Two NSURLs are considered equal if and only if they return identical values for both baseURL and relativeString."
Is there some reason for this, or is it just a bug? Logged as 13443089, at any rate.
Thanks!
-tim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden