{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/3239","labels_url":"https://api.github.com/repos/netty/netty/issues/3239/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/3239/comments","events_url":"https://api.github.com/repos/netty/netty/issues/3239/events","html_url":"https://github.com/netty/netty/pull/3239","id":51827501,"number":3239,"title":"RFC6265 cookie support","user":{"login":"slandelle","id":849197,"avatar_url":"https://avatars.githubusercontent.com/u/849197?v=3","gravatar_id":"","url":"https://api.github.com/users/slandelle","html_url":"https://github.com/slandelle","followers_url":"https://api.github.com/users/slandelle/followers","following_url":"https://api.github.com/users/slandelle/following{/other_user}","gists_url":"https://api.github.com/users/slandelle/gists{/gist_id}","starred_url":"https://api.github.com/users/slandelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slandelle/subscriptions","organizations_url":"https://api.github.com/users/slandelle/orgs","repos_url":"https://api.github.com/users/slandelle/repos","events_url":"https://api.github.com/users/slandelle/events{/privacy}","received_events_url":"https://api.github.com/users/slandelle/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/netty/netty/labels/feature","name":"feature","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"trustin","id":173918,"avatar_url":"https://avatars.githubusercontent.com/u/173918?v=3","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/netty/netty/milestones/84","labels_url":"https://api.github.com/repos/netty/netty/milestones/84/labels","id":561880,"number":84,"title":"4.1.0.Final","description":null,"creator":{"login":"trustin","id":173918,"avatar_url":"https://avatars.githubusercontent.com/u/173918?v=3","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"open_issues":45,"closed_issues":30,"state":"open","created_at":"2014-02-07T08:42:42Z","updated_at":"2015-01-21T03:16:35Z","due_on":null,"closed_at":null},"comments":22,"created_at":"2014-12-12T16:53:22Z","updated_at":"2015-01-21T12:51:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/3239","html_url":"https://github.com/netty/netty/pull/3239","diff_url":"https://github.com/netty/netty/pull/3239.diff","patch_url":"https://github.com/netty/netty/pull/3239.patch"},"body":"**Motivation:**\r\n\r\nCurrently Netty supports a weird implementation of RFC 2965.\r\nFirst, this RFC has been deprecated by RFC 6265 and nobody on the internet use this format.\r\nThen, there's a confusion between client side and server side encoding and decoding.\r\n\r\nTypically, clients should only send name=value pairs.\r\n\r\nThis PR introduces RFC 6265 support, but keeps on supporting RFC 2965 in the sense that old unused fields are simply ignored, and Cookie fields won't be populated. Deprecated fields are `comment`, `commentUrl`, `version`, `discard` and `ports`.\r\n\r\nIt also provides a mechanism for safe server-client-server roundtrip, as User-Agents are not supposed to interpret cookie values but return them as-is (e.g. if Set-Cookie contained a quoted value, it should be sent back in the Cookie header in quoted form too).\r\n\r\nAlso, there are performance gains to be obtained by not allocating the attribute name Strings, as we only want to match them to find which POJO field to populate.\r\n\r\n**Modification:**\r\n\r\nNew `RFC6265ClientCookieEncoder/Decoder` and `RFC6265ServerCookieEncoder/Decoder` pairs that live alongside old CookieEncoder/Decoder pair to not break backward compatibility.\r\n\r\nNew `Cookie.rawValue` field, used for lossless server-client-server roundtrip.\r\n\r\n**Result:**\r\n\r\nRFC 6265 support.\r\nClean separation of client and server side.\r\n\r\nDecoder performance gain:\r\n\r\n```\r\nBenchmark                     Mode  Samples        Score        Error  Units\r\nparseOldClientDecoder        thrpt       20  2070169,228 ± 105044,970  ops/s\r\nparseRFC6265ClientDecoder    thrpt       20  2954015,476 ± 126670,633  ops/s\r\n```\r\n\r\nThis PR would close #3221 and #1406.\r\n\r\nPS: I'd gladly push my benchmark, but Netty currently uses JMH 0.9 and I used 1.3.3 (lazy mode)."},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/70831188","html_url":"https://github.com/netty/netty/pull/3239#issuecomment-70831188","issue_url":"https://api.github.com/repos/netty/netty/issues/3239","id":70831188,"user":{"login":"slandelle","id":849197,"avatar_url":"https://avatars.githubusercontent.com/u/849197?v=3","gravatar_id":"","url":"https://api.github.com/users/slandelle","html_url":"https://github.com/slandelle","followers_url":"https://api.github.com/users/slandelle/followers","following_url":"https://api.github.com/users/slandelle/following{/other_user}","gists_url":"https://api.github.com/users/slandelle/gists{/gist_id}","starred_url":"https://api.github.com/users/slandelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slandelle/subscriptions","organizations_url":"https://api.github.com/users/slandelle/orgs","repos_url":"https://api.github.com/users/slandelle/repos","events_url":"https://api.github.com/users/slandelle/events{/privacy}","received_events_url":"https://api.github.com/users/slandelle/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T12:51:25Z","updated_at":"2015-01-21T12:51:25Z","body":"@trustin I guess this issue can now be closed as commit was cherry-picked to 4.1 and master."}}