[
https://issues.apache.org/jira/browse/HTTPCLIENT-1614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14323244#comment-14323244
]
Oleg Kalnichevski commented on HTTPCLIENT-1614:
-----------------------------------------------
Ronald
This is done per requirement of RFC 6265, section 4.1.2.3
{noformat}
4.1.2.3. The Domain Attribute
...
WARNING: Some existing user agents treat an absent Domain
attribute as if the Domain attribute were present and contained
the current host name. For example, if example.com returns a Set-
Cookie header without a Domain attribute, these user agents will
erroneously send the cookie to www.example.com as well.
{noformat}
If you need to reconstruct a cookie from a persistent store, you also need to
persist the original set of attributes sent by the origin server, not just
effective attributes.
Oleg
> Domain processing incompatible with 4.3.6
> -----------------------------------------
>
> Key: HTTPCLIENT-1614
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1614
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.4 Final
> Reporter: Ronald Brill
>
> Hi Oleg,
> last week we have updated HtmlUnit (SNAPSHOT) from 4.3.6 to 4.4. During that
> we noticed a major difference. After some debugging i guess i found the
> reason.
> The BasicDomainHandler#match impl checks for the existence of a attribute
> (DOMAIN_ATTR). Because we are building our own the cookies (using the
> constructur and some getter/setter and not parsing some headers), the attrib
> map is empty. But of course the domain attribute is set.
> It will help, if the match impl will check the real fields instead of the
> attrib map. Additionally this will be more consistent because the domainMatch
> method already uses the domain field and not the value from the attrib map.
> What do you think?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]