{"action":"created","issue":{"url":"https://api.github.com/repos/netty/netty/issues/3876","labels_url":"https://api.github.com/repos/netty/netty/issues/3876/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/3876/comments","events_url":"https://api.github.com/repos/netty/netty/issues/3876/events","html_url":"https://github.com/netty/netty/pull/3876","id":86546629,"number":3876,"title":"Lazily instantiate HttpServerUpgradeHandler.UpgradeCodec","user":{"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},"labels":[{"url":"https://api.github.com/repos/netty/netty/labels/feature","name":"feature","color":"009800"}],"state":"closed","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/117","html_url":"https://github.com/netty/netty/milestones/4.1.0.Beta6","labels_url":"https://api.github.com/repos/netty/netty/milestones/117/labels","id":1100817,"number":117,"title":"4.1.0.Beta6","description":"","creator":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=3","gravatar_id":"","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"open_issues":66,"closed_issues":26,"state":"open","created_at":"2015-05-07T19:29:09Z","updated_at":"2015-06-10T03:08:38Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-06-09T10:33:52Z","updated_at":"2015-06-10T03:08:38Z","closed_at":"2015-06-10T03:08:38Z","pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/3876","html_url":"https://github.com/netty/netty/pull/3876","diff_url":"https://github.com/netty/netty/pull/3876.diff","patch_url":"https://github.com/netty/netty/pull/3876.patch"},"body":"Related: #3814\r\n\r\nMotivation:\r\n\r\nTo implement the support for an upgrade from cleartext HTTP/1.1 connection to cleartext HTTP/2 (h2c) connection, a user usually uses HttpServerUpgradeHandler.\r\n\r\nIt does its job, but it requires a user to instantiate the UpgradeCodecs for all supported protocols upfront. It means redundancy for the connections that are not upgraded.\r\n\r\nModifications:\r\n\r\n- Change the constructor of HttpServerUpgradeHandler\r\n  - Accept UpgraceCodecFactory instead of UpgradeCodecs\r\n- Adjust the minimum possible value of maxContentLength from 1 to 0, so that a user can completely disallow an upgrade request with non-empty content\r\n  - The default constructor of HttpServerUpgradeHandler sets the maxContentLength to 0 now, which shouldn't be a problem because a usual upgrade request is a GET.\r\n- Update the examples accordingly\r\n\r\nResult:\r\n\r\nA user can instantiate Http2ServerUpgradeCodec and its related objects (Http2Connection, Http2FrameReader/Writer, Http2FrameListener, etc) only when necessary."},"comment":{"url":"https://api.github.com/repos/netty/netty/issues/comments/110570446","html_url":"https://github.com/netty/netty/pull/3876#issuecomment-110570446","issue_url":"https://api.github.com/repos/netty/netty/issues/3876","id":110570446,"user":{"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},"created_at":"2015-06-10T03:08:38Z","updated_at":"2015-06-10T03:08:38Z","body":"Cherry-picked:\r\n- 4.1: 950da2eae1471c436424555f1d79bc08d3ba38c3 0ca65f13739560fb580c0c4e40952f65c609651c\r\n- master: 17586d15d582d15ca843857855818a6fe41d1b72 88cf2ee2129d4de354bb35d0387824e4d773072e"}}