{"action":"created","comment":{"url":"https://api.github.com/repos/3Hren/cocaine-core/pulls/comments/31703847","id":31703847,"diff_hunk":"@@ -0,0 +1,159 @@\n+/*\n+    Copyright (c) 2011-2015 Anton Matveenko <antmat@yandex-team.ru>\n+    Copyright (c) 2011-2015 Other contributors as noted in the AUTHORS file.\n+\n+    This file is part of Cocaine.\n+\n+    Cocaine is free software; you can redistribute it and/or modify\n+    it under the terms of the GNU Lesser General Public License as published by\n+    the Free Software Foundation; either version 3 of the License, or\n+    (at your option) any later version.\n+\n+    Cocaine is distributed in the hope that it will be useful,\n+    but WITHOUT ANY WARRANTY; without even the implied warranty of\n+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+    GNU Lesser General Public License for more details.\n+\n+    You should have received a copy of the GNU Lesser General Public License\n+    along with this program. If not, see <http://www.gnu.org/licenses/>.\n+*/\n+\n+\n+#ifndef COCAINE_TRAITS_HEADER_HPP\n+#define COCAINE_TRAITS_HEADER_HPP\n+\n+#include \"cocaine/rpc/asio/header.hpp\"\n+#include \"cocaine/traits.hpp\"\n+\n+namespace cocaine { namespace io {\n+\n+struct header_traits {\n+\n+    // Pack a header from static table with predefined value\n+    template<class Header, class Stream>\n+    static\n+    void\n+    pack(msgpack::packer<Stream>& packer) {\n+        static_assert(boost::mpl::contains<header_static_table_t::headers, Header>::type::value, \"Header is not present in static table\");\n+        packer.pack_fix_uint64(header_static_table_t::idx<Header>());\n+    }\n+\n+    // Pack a header from statis table but with different value\n+    template<class Header, class Stream>\n+    static\n+    void\n+    pack(msgpack::packer<Stream>& packer, header_table_t& table, header::data_t& header_data) {","path":"include/cocaine/traits/header.hpp","position":45,"original_position":45,"commit_id":"0410a04e207b4a4bb4bbab3890c8b29c019045e5","original_commit_id":"0410a04e207b4a4bb4bbab3890c8b29c019045e5","user":{"login":"3Hren","id":969900,"avatar_url":"https://avatars.githubusercontent.com/u/969900?v=3","gravatar_id":"","url":"https://api.github.com/users/3Hren","html_url":"https://github.com/3Hren","followers_url":"https://api.github.com/users/3Hren/followers","following_url":"https://api.github.com/users/3Hren/following{/other_user}","gists_url":"https://api.github.com/users/3Hren/gists{/gist_id}","starred_url":"https://api.github.com/users/3Hren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3Hren/subscriptions","organizations_url":"https://api.github.com/users/3Hren/orgs","repos_url":"https://api.github.com/users/3Hren/repos","events_url":"https://api.github.com/users/3Hren/events{/privacy}","received_events_url":"https://api.github.com/users/3Hren/received_events","type":"User","site_admin":false},"body":"Are you sure you need non-const reference for packing?","created_at":"2015-06-04T09:04:07Z","updated_at":"2015-06-04T09:04:07Z","html_url":"https://github.com/3Hren/cocaine-core/pull/8#discussion_r31703847","pull_request_url":"https://api.github.com/repos/3Hren/cocaine-core/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/3Hren/cocaine-core/pulls/comments/31703847"},"html":{"href":"https://github.com/3Hren/cocaine-core/pull/8#discussion_r31703847"},"pull_request":{"href":"https://api.github.com/repos/3Hren/cocaine-core/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/3Hren/cocaine-core/pulls/8","id":36281063,"html_url":"https://github.com/3Hren/cocaine-core/pull/8","diff_url":"https://github.com/3Hren/cocaine-core/pull/8.diff","patch_url":"https://github.com/3Hren/cocaine-core/pull/8.patch","issue_url":"https://api.github.com/repos/3Hren/cocaine-core/issues/8","number":8,"state":"open","locked":false,"title":"Headers","user":{"login":"antmat","id":691770,"avatar_url":"https://avatars.githubusercontent.com/u/691770?v=3","gravatar_id":"","url":"https://api.github.com/users/antmat","html_url":"https://github.com/antmat","followers_url":"https://api.github.com/users/antmat/followers","following_url":"https://api.github.com/users/antmat/following{/other_user}","gists_url":"https://api.github.com/users/antmat/gists{/gist_id}","starred_url":"https://api.github.com/users/antmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antmat/subscriptions","organizations_url":"https://api.github.com/users/antmat/orgs","repos_url":"https://api.github.com/users/antmat/repos","events_url":"https://api.github.com/users/antmat/events{/privacy}","received_events_url":"https://api.github.com/users/antmat/received_events","type":"User","site_admin":false},"body":"http2-like headers implementation","created_at":"2015-05-27T08:43:39Z","updated_at":"2015-06-04T09:04:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57ead956ca77def460868148d3c85b69e3528dbe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/3Hren/cocaine-core/pulls/8/commits","review_comments_url":"https://api.github.com/repos/3Hren/cocaine-core/pulls/8/comments","review_comment_url":"https://api.github.com/repos/3Hren/cocaine-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/3Hren/cocaine-core/issues/8/comments","statuses_url":"https://api.github.com/repos/3Hren/cocaine-core/statuses/0410a04e207b4a4bb4bbab3890c8b29c019045e5","head":{"label":"antmat:headers","ref":"headers","sha":"0410a04e207b4a4bb4bbab3890c8b29c019045e5","user":{"login":"antmat","id":691770,"avatar_url":"https://avatars.githubusercontent.com/u/691770?v=3","gravatar_id":"","url":"https://api.github.com/users/antmat","html_url":"https://github.com/antmat","followers_url":"https://api.github.com/users/antmat/followers","following_url":"https://api.github.com/users/antmat/following{/other_user}","gists_url":"https://api.github.com/users/antmat/gists{/gist_id}","starred_url":"https://api.github.com/users/antmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antmat/subscriptions","organizations_url":"https://api.github.com/users/antmat/orgs","repos_url":"https://api.github.com/users/antmat/repos","events_url":"https://api.github.com/users/antmat/events{/privacy}","received_events_url":"https://api.github.com/users/antmat/received_events","type":"User","site_admin":false},"repo":{"id":30540805,"name":"cocaine-core","full_name":"antmat/cocaine-core","owner":{"login":"antmat","id":691770,"avatar_url":"https://avatars.githubusercontent.com/u/691770?v=3","gravatar_id":"","url":"https://api.github.com/users/antmat","html_url":"https://github.com/antmat","followers_url":"https://api.github.com/users/antmat/followers","following_url":"https://api.github.com/users/antmat/following{/other_user}","gists_url":"https://api.github.com/users/antmat/gists{/gist_id}","starred_url":"https://api.github.com/users/antmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antmat/subscriptions","organizations_url":"https://api.github.com/users/antmat/orgs","repos_url":"https://api.github.com/users/antmat/repos","events_url":"https://api.github.com/users/antmat/events{/privacy}","received_events_url":"https://api.github.com/users/antmat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antmat/cocaine-core","description":"An open platform to build your own PaaS clouds.","fork":true,"url":"https://api.github.com/repos/antmat/cocaine-core","forks_url":"https://api.github.com/repos/antmat/cocaine-core/forks","keys_url":"https://api.github.com/repos/antmat/cocaine-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antmat/cocaine-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antmat/cocaine-core/teams","hooks_url":"https://api.github.com/repos/antmat/cocaine-core/hooks","issue_events_url":"https://api.github.com/repos/antmat/cocaine-core/issues/events{/number}","events_url":"https://api.github.com/repos/antmat/cocaine-core/events","assignees_url":"https://api.github.com/repos/antmat/cocaine-core/assignees{/user}","branches_url":"https://api.github.com/repos/antmat/cocaine-core/branches{/branch}","tags_url":"https://api.github.com/repos/antmat/cocaine-core/tags","blobs_url":"https://api.github.com/repos/antmat/cocaine-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antmat/cocaine-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antmat/cocaine-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/antmat/cocaine-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antmat/cocaine-core/statuses/{sha}","languages_url":"https://api.github.com/repos/antmat/cocaine-core/languages","stargazers_url":"https://api.github.com/repos/antmat/cocaine-core/stargazers","contributors_url":"https://api.github.com/repos/antmat/cocaine-core/contributors","subscribers_url":"https://api.github.com/repos/antmat/cocaine-core/subscribers","subscription_url":"https://api.github.com/repos/antmat/cocaine-core/subscription","commits_url":"https://api.github.com/repos/antmat/cocaine-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/antmat/cocaine-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/antmat/cocaine-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/antmat/cocaine-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/antmat/cocaine-core/contents/{+path}","compare_url":"https://api.github.com/repos/antmat/cocaine-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antmat/cocaine-core/merges","archive_url":"https://api.github.com/repos/antmat/cocaine-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antmat/cocaine-core/downloads","issues_url":"https://api.github.com/repos/antmat/cocaine-core/issues{/number}","pulls_url":"https://api.github.com/repos/antmat/cocaine-core/pulls{/number}","milestones_url":"https://api.github.com/repos/antmat/cocaine-core/milestones{/number}","notifications_url":"https://api.github.com/repos/antmat/cocaine-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antmat/cocaine-core/labels{/name}","releases_url":"https://api.github.com/repos/antmat/cocaine-core/releases{/id}","created_at":"2015-02-09T14:53:42Z","updated_at":"2015-04-10T11:11:09Z","pushed_at":"2015-06-03T17:29:22Z","git_url":"git://github.com/antmat/cocaine-core.git","ssh_url":"git@github.com:antmat/cocaine-core.git","clone_url":"https://github.com/antmat/cocaine-core.git","svn_url":"https://github.com/antmat/cocaine-core","homepage":"","size":14691,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"3Hren:nightly","ref":"nightly","sha":"1a8cf296705b07765807c87edd5a4b90bc2782f2","user":{"login":"3Hren","id":969900,"avatar_url":"https://avatars.githubusercontent.com/u/969900?v=3","gravatar_id":"","url":"https://api.github.com/users/3Hren","html_url":"https://github.com/3Hren","followers_url":"https://api.github.com/users/3Hren/followers","following_url":"https://api.github.com/users/3Hren/following{/other_user}","gists_url":"https://api.github.com/users/3Hren/gists{/gist_id}","starred_url":"https://api.github.com/users/3Hren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3Hren/subscriptions","organizations_url":"https://api.github.com/users/3Hren/orgs","repos_url":"https://api.github.com/users/3Hren/repos","events_url":"https://api.github.com/users/3Hren/events{/privacy}","received_events_url":"https://api.github.com/users/3Hren/received_events","type":"User","site_admin":false},"repo":{"id":11948568,"name":"cocaine-core","full_name":"3Hren/cocaine-core","owner":{"login":"3Hren","id":969900,"avatar_url":"https://avatars.githubusercontent.com/u/969900?v=3","gravatar_id":"","url":"https://api.github.com/users/3Hren","html_url":"https://github.com/3Hren","followers_url":"https://api.github.com/users/3Hren/followers","following_url":"https://api.github.com/users/3Hren/following{/other_user}","gists_url":"https://api.github.com/users/3Hren/gists{/gist_id}","starred_url":"https://api.github.com/users/3Hren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3Hren/subscriptions","organizations_url":"https://api.github.com/users/3Hren/orgs","repos_url":"https://api.github.com/users/3Hren/repos","events_url":"https://api.github.com/users/3Hren/events{/privacy}","received_events_url":"https://api.github.com/users/3Hren/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/3Hren/cocaine-core","description":"Cocaine Application Engine","fork":true,"url":"https://api.github.com/repos/3Hren/cocaine-core","forks_url":"https://api.github.com/repos/3Hren/cocaine-core/forks","keys_url":"https://api.github.com/repos/3Hren/cocaine-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/3Hren/cocaine-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/3Hren/cocaine-core/teams","hooks_url":"https://api.github.com/repos/3Hren/cocaine-core/hooks","issue_events_url":"https://api.github.com/repos/3Hren/cocaine-core/issues/events{/number}","events_url":"https://api.github.com/repos/3Hren/cocaine-core/events","assignees_url":"https://api.github.com/repos/3Hren/cocaine-core/assignees{/user}","branches_url":"https://api.github.com/repos/3Hren/cocaine-core/branches{/branch}","tags_url":"https://api.github.com/repos/3Hren/cocaine-core/tags","blobs_url":"https://api.github.com/repos/3Hren/cocaine-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/3Hren/cocaine-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/3Hren/cocaine-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/3Hren/cocaine-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/3Hren/cocaine-core/statuses/{sha}","languages_url":"https://api.github.com/repos/3Hren/cocaine-core/languages","stargazers_url":"https://api.github.com/repos/3Hren/cocaine-core/stargazers","contributors_url":"https://api.github.com/repos/3Hren/cocaine-core/contributors","subscribers_url":"https://api.github.com/repos/3Hren/cocaine-core/subscribers","subscription_url":"https://api.github.com/repos/3Hren/cocaine-core/subscription","commits_url":"https://api.github.com/repos/3Hren/cocaine-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/3Hren/cocaine-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/3Hren/cocaine-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/3Hren/cocaine-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/3Hren/cocaine-core/contents/{+path}","compare_url":"https://api.github.com/repos/3Hren/cocaine-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/3Hren/cocaine-core/merges","archive_url":"https://api.github.com/repos/3Hren/cocaine-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/3Hren/cocaine-core/downloads","issues_url":"https://api.github.com/repos/3Hren/cocaine-core/issues{/number}","pulls_url":"https://api.github.com/repos/3Hren/cocaine-core/pulls{/number}","milestones_url":"https://api.github.com/repos/3Hren/cocaine-core/milestones{/number}","notifications_url":"https://api.github.com/repos/3Hren/cocaine-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/3Hren/cocaine-core/labels{/name}","releases_url":"https://api.github.com/repos/3Hren/cocaine-core/releases{/id}","created_at":"2013-08-07T11:36:51Z","updated_at":"2015-04-23T09:46:28Z","pushed_at":"2015-06-03T17:29:23Z","git_url":"git://github.com/3Hren/cocaine-core.git","ssh_url":"git@github.com:3Hren/cocaine-core.git","clone_url":"https://github.com/3Hren/cocaine-core.git","svn_url":"https://github.com/3Hren/cocaine-core","homepage":"","size":13980,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"nightly"}},"_links":{"self":{"href":"https://api.github.com/repos/3Hren/cocaine-core/pulls/8"},"html":{"href":"https://github.com/3Hren/cocaine-core/pull/8"},"issue":{"href":"https://api.github.com/repos/3Hren/cocaine-core/issues/8"},"comments":{"href":"https://api.github.com/repos/3Hren/cocaine-core/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/3Hren/cocaine-core/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/3Hren/cocaine-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/3Hren/cocaine-core/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/3Hren/cocaine-core/statuses/0410a04e207b4a4bb4bbab3890c8b29c019045e5"}}}}