{"action":"created","issue":{"url":"https://api.github.com/repos/square/okhttp/issues/2284","labels_url":"https://api.github.com/repos/square/okhttp/issues/2284/labels{/name}","comments_url":"https://api.github.com/repos/square/okhttp/issues/2284/comments","events_url":"https://api.github.com/repos/square/okhttp/issues/2284/events","html_url":"https://github.com/square/okhttp/pull/2284","id":128986325,"number":2284,"title":"Override the equals() and hashCode() methods of Cookie","user":{"login":"franmontiel","id":9967103,"avatar_url":"https://avatars.githubusercontent.com/u/9967103?v=3","gravatar_id":"","url":"https://api.github.com/users/franmontiel","html_url":"https://github.com/franmontiel","followers_url":"https://api.github.com/users/franmontiel/followers","following_url":"https://api.github.com/users/franmontiel/following{/other_user}","gists_url":"https://api.github.com/users/franmontiel/gists{/gist_id}","starred_url":"https://api.github.com/users/franmontiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franmontiel/subscriptions","organizations_url":"https://api.github.com/users/franmontiel/orgs","repos_url":"https://api.github.com/users/franmontiel/repos","events_url":"https://api.github.com/users/franmontiel/events{/privacy}","received_events_url":"https://api.github.com/users/franmontiel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-27T00:25:57Z","updated_at":"2016-01-27T12:47:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/square/okhttp/pulls/2284","html_url":"https://github.com/square/okhttp/pull/2284","diff_url":"https://github.com/square/okhttp/pull/2284.diff","patch_url":"https://github.com/square/okhttp/pull/2284.patch"},"body":"Now it is possible to use Cookies in Collections that depend on the hash function. (Useful when implementing an in-memory CookieJar)\r\n\r\nBoth methods takes into account the name, domain a path values as mentioned in the RFC6265 specs (https://tools.ietf.org/html/rfc6265#section-4.1.2):\r\n\"If the user agent receives a new cookie with the same cookie-name,domain-value, and path-value as a cookie that it has already stored, the existing cookie is evicted and replaced with the new cookie.\""},"comment":{"url":"https://api.github.com/repos/square/okhttp/issues/comments/175601591","html_url":"https://github.com/square/okhttp/pull/2284#issuecomment-175601591","issue_url":"https://api.github.com/repos/square/okhttp/issues/2284","id":175601591,"user":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T12:47:30Z","updated_at":"2016-01-27T12:47:30Z","body":"It's really weird if your Set claims that it contains the cookie `foo=bar` when it contains the key `foo=quux` because the cookies value isn't considered in equality.\r\n\r\nThe only correct way to implement equals is that two values are equal if they're interchangeable. Two cookies with different values are not interchangeable."}}