korpus, ничего подобного.
-~{}~ 16.10.10 16:07:
Пара вопросов к тем, кто в теме.
Cookies описывает
RFC 2109, насколько я понимаю.
Hosts names can be specified either as an IP address or a FQHN
string. Sometimes we compare one host name with another. Host A's
name domain-matches host B's if
* both host names are IP addresses and their host name strings match
exactly; or
* both host names are FQDN strings and their host name strings match
exactly; or
* A is a FQDN string and has the form NB, where N is a non-empty name
string, B has the form .B', and B' is a FQDN string. (So, x.y.com
domain-matches .y.com but not y.com.)
Домен "www.example.com" (N == "www") совпадает с ".example.com" согласно 3-му пункту.
Домен "example.com" НЕ совпадает (?) с ".example.com".
4.3.2 Rejecting Cookies
To prevent possible security or privacy violations, a user agent
rejects a cookie (shall not store its information) if any of the
following is true:
* The value for the Path attribute is not a prefix of the request-
URI.
* The value for the Domain attribute contains no embedded dots or
does not start with a dot.
* The value for the request-host does not domain-match the Domain
attribute.
* The request-host is a FQDN (not IP address) and has the form HD,
where D is the value of the Domain attribute, and H is a string
that contains one or more dots.
Examples:
* A Set-Cookie from request-host y.x.foo.com for Domain=.foo.com
would be rejected, because H is y.x and contains a dot.
2-й пункт, как я понимаю, запрещает домены типа "localhost", "com", ".com", "com.", т.к. там нет _внутри_ точек. Правильно я понимаю «embedded dots»?
4-й пункт говорит, что cookie с домена "y.x.foo.com" с domain-value ".foo.com" должна быть отклонена, но не сказано, что запрещено ставить такую cookie с домена "x.foo.com". А 3-й пункт запрещает ставить cookie с "foo.com" с domain-value ".foo.com"?!
-~{}~ 16.10.10 16:08:
Тесты в Firefox 3.x и Google Chrome последнее не подтверждают.