{"action":"created","comment":{"url":"https://api.github.com/repos/tumblr/colossus/pulls/comments/37904289","id":37904289,"diff_hunk":"@@ -82,9 +82,9 @@ trait HttpHeaderUtils {\n    * Be aware that lacking this header may or may not be a valid request,\n    * depending if the \"transfer-encoding\" header is set to \"chunked\"\n    */\n-  val contentLength: Option[Int] = headers.collectFirst{case (HttpHeaders.ContentLength, l) => l.toInt}\n+  def contentLength: Option[Int] = headers.collectFirst{case (HttpHeaders.ContentLength, l) => l.toInt}","path":"colossus/src/main/scala/colossus/protocols/http/Header.scala","position":5,"original_position":5,"commit_id":"b9f969430ca1731b89ab5eda77012231925f1b12","original_commit_id":"b9f969430ca1731b89ab5eda77012231925f1b12","user":{"login":"nsauro","id":2262111,"avatar_url":"https://avatars.githubusercontent.com/u/2262111?v=3","gravatar_id":"","url":"https://api.github.com/users/nsauro","html_url":"https://github.com/nsauro","followers_url":"https://api.github.com/users/nsauro/followers","following_url":"https://api.github.com/users/nsauro/following{/other_user}","gists_url":"https://api.github.com/users/nsauro/gists{/gist_id}","starred_url":"https://api.github.com/users/nsauro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsauro/subscriptions","organizations_url":"https://api.github.com/users/nsauro/orgs","repos_url":"https://api.github.com/users/nsauro/repos","events_url":"https://api.github.com/users/nsauro/events{/privacy}","received_events_url":"https://api.github.com/users/nsauro/received_events","type":"User","site_admin":false},"body":"couldn't these be lazy vals?","created_at":"2015-08-25T18:53:57Z","updated_at":"2015-08-25T18:53:57Z","html_url":"https://github.com/tumblr/colossus/pull/249#discussion_r37904289","pull_request_url":"https://api.github.com/repos/tumblr/colossus/pulls/249","_links":{"self":{"href":"https://api.github.com/repos/tumblr/colossus/pulls/comments/37904289"},"html":{"href":"https://github.com/tumblr/colossus/pull/249#discussion_r37904289"},"pull_request":{"href":"https://api.github.com/repos/tumblr/colossus/pulls/249"}}},"pull_request":{"url":"https://api.github.com/repos/tumblr/colossus/pulls/249","id":43203667,"html_url":"https://github.com/tumblr/colossus/pull/249","diff_url":"https://github.com/tumblr/colossus/pull/249.diff","patch_url":"https://github.com/tumblr/colossus/pull/249.patch","issue_url":"https://api.github.com/repos/tumblr/colossus/issues/249","number":249,"state":"open","locked":false,"title":"response headers are bytestrings","user":{"login":"DanSimon","id":287961,"avatar_url":"https://avatars.githubusercontent.com/u/287961?v=3","gravatar_id":"","url":"https://api.github.com/users/DanSimon","html_url":"https://github.com/DanSimon","followers_url":"https://api.github.com/users/DanSimon/followers","following_url":"https://api.github.com/users/DanSimon/following{/other_user}","gists_url":"https://api.github.com/users/DanSimon/gists{/gist_id}","starred_url":"https://api.github.com/users/DanSimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanSimon/subscriptions","organizations_url":"https://api.github.com/users/DanSimon/orgs","repos_url":"https://api.github.com/users/DanSimon/repos","events_url":"https://api.github.com/users/DanSimon/events{/privacy}","received_events_url":"https://api.github.com/users/DanSimon/received_events","type":"User","site_admin":false},"body":"This significantly improves the performance of writing http responses with several headers.  I plan to do the same thing with request headers, but that'll have to wait for another PR to get merged.\r\n\r\nThis does introduce a breaking API change, but the migration is pretty easy.  Currently to add headers in the construction of a response, you do:\r\n\r\n```scala\r\nHttpResponse(headers = Vector((\"name\" -> \"value\")), //...\r\n```\r\n\r\nnow it's just\r\n\r\n```scala\r\nHttpResponse(headers = Vector(HttpResponseHeader(\"name\", \"value\")), //...\r\n``` \r\n\r\nDoing `.withHeader` on a response is unaffected.","created_at":"2015-08-24T18:08:27Z","updated_at":"2015-08-25T18:53:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08026bc2e46f4e4d1045de2f955ceec73b8c4c4b","assignee":null,"milestone":{"url":"https://api.github.com/repos/tumblr/colossus/milestones/22","html_url":"https://github.com/tumblr/colossus/milestones/0.6.6","labels_url":"https://api.github.com/repos/tumblr/colossus/milestones/22/labels","id":1258847,"number":22,"title":"0.6.6","description":"Bug fix release","creator":{"login":"DanSimon","id":287961,"avatar_url":"https://avatars.githubusercontent.com/u/287961?v=3","gravatar_id":"","url":"https://api.github.com/users/DanSimon","html_url":"https://github.com/DanSimon","followers_url":"https://api.github.com/users/DanSimon/followers","following_url":"https://api.github.com/users/DanSimon/following{/other_user}","gists_url":"https://api.github.com/users/DanSimon/gists{/gist_id}","starred_url":"https://api.github.com/users/DanSimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanSimon/subscriptions","organizations_url":"https://api.github.com/users/DanSimon/orgs","repos_url":"https://api.github.com/users/DanSimon/repos","events_url":"https://api.github.com/users/DanSimon/events{/privacy}","received_events_url":"https://api.github.com/users/DanSimon/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2015-08-17T18:07:54Z","updated_at":"2015-08-24T18:15:04Z","due_on":"2015-08-29T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/tumblr/colossus/pulls/249/commits","review_comments_url":"https://api.github.com/repos/tumblr/colossus/pulls/249/comments","review_comment_url":"https://api.github.com/repos/tumblr/colossus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tumblr/colossus/issues/249/comments","statuses_url":"https://api.github.com/repos/tumblr/colossus/statuses/b9f969430ca1731b89ab5eda77012231925f1b12","head":{"label":"tumblr:response-headers","ref":"response-headers","sha":"b9f969430ca1731b89ab5eda77012231925f1b12","user":{"login":"tumblr","id":366151,"avatar_url":"https://avatars.githubusercontent.com/u/366151?v=3","gravatar_id":"","url":"https://api.github.com/users/tumblr","html_url":"https://github.com/tumblr","followers_url":"https://api.github.com/users/tumblr/followers","following_url":"https://api.github.com/users/tumblr/following{/other_user}","gists_url":"https://api.github.com/users/tumblr/gists{/gist_id}","starred_url":"https://api.github.com/users/tumblr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tumblr/subscriptions","organizations_url":"https://api.github.com/users/tumblr/orgs","repos_url":"https://api.github.com/users/tumblr/repos","events_url":"https://api.github.com/users/tumblr/events{/privacy}","received_events_url":"https://api.github.com/users/tumblr/received_events","type":"Organization","site_admin":false},"repo":{"id":26492586,"name":"colossus","full_name":"tumblr/colossus","owner":{"login":"tumblr","id":366151,"avatar_url":"https://avatars.githubusercontent.com/u/366151?v=3","gravatar_id":"","url":"https://api.github.com/users/tumblr","html_url":"https://github.com/tumblr","followers_url":"https://api.github.com/users/tumblr/followers","following_url":"https://api.github.com/users/tumblr/following{/other_user}","gists_url":"https://api.github.com/users/tumblr/gists{/gist_id}","starred_url":"https://api.github.com/users/tumblr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tumblr/subscriptions","organizations_url":"https://api.github.com/users/tumblr/orgs","repos_url":"https://api.github.com/users/tumblr/repos","events_url":"https://api.github.com/users/tumblr/events{/privacy}","received_events_url":"https://api.github.com/users/tumblr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tumblr/colossus","description":"I/O and Microservice library for Scala","fork":false,"url":"https://api.github.com/repos/tumblr/colossus","forks_url":"https://api.github.com/repos/tumblr/colossus/forks","keys_url":"https://api.github.com/repos/tumblr/colossus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tumblr/colossus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tumblr/colossus/teams","hooks_url":"https://api.github.com/repos/tumblr/colossus/hooks","issue_events_url":"https://api.github.com/repos/tumblr/colossus/issues/events{/number}","events_url":"https://api.github.com/repos/tumblr/colossus/events","assignees_url":"https://api.github.com/repos/tumblr/colossus/assignees{/user}","branches_url":"https://api.github.com/repos/tumblr/colossus/branches{/branch}","tags_url":"https://api.github.com/repos/tumblr/colossus/tags","blobs_url":"https://api.github.com/repos/tumblr/colossus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tumblr/colossus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tumblr/colossus/git/refs{/sha}","trees_url":"https://api.github.com/repos/tumblr/colossus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tumblr/colossus/statuses/{sha}","languages_url":"https://api.github.com/repos/tumblr/colossus/languages","stargazers_url":"https://api.github.com/repos/tumblr/colossus/stargazers","contributors_url":"https://api.github.com/repos/tumblr/colossus/contributors","subscribers_url":"https://api.github.com/repos/tumblr/colossus/subscribers","subscription_url":"https://api.github.com/repos/tumblr/colossus/subscription","commits_url":"https://api.github.com/repos/tumblr/colossus/commits{/sha}","git_commits_url":"https://api.github.com/repos/tumblr/colossus/git/commits{/sha}","comments_url":"https://api.github.com/repos/tumblr/colossus/comments{/number}","issue_comment_url":"https://api.github.com/repos/tumblr/colossus/issues/comments{/number}","contents_url":"https://api.github.com/repos/tumblr/colossus/contents/{+path}","compare_url":"https://api.github.com/repos/tumblr/colossus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tumblr/colossus/merges","archive_url":"https://api.github.com/repos/tumblr/colossus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tumblr/colossus/downloads","issues_url":"https://api.github.com/repos/tumblr/colossus/issues{/number}","pulls_url":"https://api.github.com/repos/tumblr/colossus/pulls{/number}","milestones_url":"https://api.github.com/repos/tumblr/colossus/milestones{/number}","notifications_url":"https://api.github.com/repos/tumblr/colossus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tumblr/colossus/labels{/name}","releases_url":"https://api.github.com/repos/tumblr/colossus/releases{/id}","created_at":"2014-11-11T16:06:06Z","updated_at":"2015-08-25T18:05:43Z","pushed_at":"2015-08-24T18:15:04Z","git_url":"git://github.com/tumblr/colossus.git","ssh_url":"git@github.com:tumblr/colossus.git","clone_url":"https://github.com/tumblr/colossus.git","svn_url":"https://github.com/tumblr/colossus","homepage":"","size":6046,"stargazers_count":611,"watchers_count":611,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":45,"mirror_url":null,"open_issues_count":19,"forks":45,"open_issues":19,"watchers":611,"default_branch":"master"}},"base":{"label":"tumblr:master","ref":"master","sha":"69ca6a6321d88507d76574c1d25be1dcbdb4fe7e","user":{"login":"tumblr","id":366151,"avatar_url":"https://avatars.githubusercontent.com/u/366151?v=3","gravatar_id":"","url":"https://api.github.com/users/tumblr","html_url":"https://github.com/tumblr","followers_url":"https://api.github.com/users/tumblr/followers","following_url":"https://api.github.com/users/tumblr/following{/other_user}","gists_url":"https://api.github.com/users/tumblr/gists{/gist_id}","starred_url":"https://api.github.com/users/tumblr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tumblr/subscriptions","organizations_url":"https://api.github.com/users/tumblr/orgs","repos_url":"https://api.github.com/users/tumblr/repos","events_url":"https://api.github.com/users/tumblr/events{/privacy}","received_events_url":"https://api.github.com/users/tumblr/received_events","type":"Organization","site_admin":false},"repo":{"id":26492586,"name":"colossus","full_name":"tumblr/colossus","owner":{"login":"tumblr","id":366151,"avatar_url":"https://avatars.githubusercontent.com/u/366151?v=3","gravatar_id":"","url":"https://api.github.com/users/tumblr","html_url":"https://github.com/tumblr","followers_url":"https://api.github.com/users/tumblr/followers","following_url":"https://api.github.com/users/tumblr/following{/other_user}","gists_url":"https://api.github.com/users/tumblr/gists{/gist_id}","starred_url":"https://api.github.com/users/tumblr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tumblr/subscriptions","organizations_url":"https://api.github.com/users/tumblr/orgs","repos_url":"https://api.github.com/users/tumblr/repos","events_url":"https://api.github.com/users/tumblr/events{/privacy}","received_events_url":"https://api.github.com/users/tumblr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tumblr/colossus","description":"I/O and Microservice library for Scala","fork":false,"url":"https://api.github.com/repos/tumblr/colossus","forks_url":"https://api.github.com/repos/tumblr/colossus/forks","keys_url":"https://api.github.com/repos/tumblr/colossus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tumblr/colossus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tumblr/colossus/teams","hooks_url":"https://api.github.com/repos/tumblr/colossus/hooks","issue_events_url":"https://api.github.com/repos/tumblr/colossus/issues/events{/number}","events_url":"https://api.github.com/repos/tumblr/colossus/events","assignees_url":"https://api.github.com/repos/tumblr/colossus/assignees{/user}","branches_url":"https://api.github.com/repos/tumblr/colossus/branches{/branch}","tags_url":"https://api.github.com/repos/tumblr/colossus/tags","blobs_url":"https://api.github.com/repos/tumblr/colossus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tumblr/colossus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tumblr/colossus/git/refs{/sha}","trees_url":"https://api.github.com/repos/tumblr/colossus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tumblr/colossus/statuses/{sha}","languages_url":"https://api.github.com/repos/tumblr/colossus/languages","stargazers_url":"https://api.github.com/repos/tumblr/colossus/stargazers","contributors_url":"https://api.github.com/repos/tumblr/colossus/contributors","subscribers_url":"https://api.github.com/repos/tumblr/colossus/subscribers","subscription_url":"https://api.github.com/repos/tumblr/colossus/subscription","commits_url":"https://api.github.com/repos/tumblr/colossus/commits{/sha}","git_commits_url":"https://api.github.com/repos/tumblr/colossus/git/commits{/sha}","comments_url":"https://api.github.com/repos/tumblr/colossus/comments{/number}","issue_comment_url":"https://api.github.com/repos/tumblr/colossus/issues/comments{/number}","contents_url":"https://api.github.com/repos/tumblr/colossus/contents/{+path}","compare_url":"https://api.github.com/repos/tumblr/colossus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tumblr/colossus/merges","archive_url":"https://api.github.com/repos/tumblr/colossus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tumblr/colossus/downloads","issues_url":"https://api.github.com/repos/tumblr/colossus/issues{/number}","pulls_url":"https://api.github.com/repos/tumblr/colossus/pulls{/number}","milestones_url":"https://api.github.com/repos/tumblr/colossus/milestones{/number}","notifications_url":"https://api.github.com/repos/tumblr/colossus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tumblr/colossus/labels{/name}","releases_url":"https://api.github.com/repos/tumblr/colossus/releases{/id}","created_at":"2014-11-11T16:06:06Z","updated_at":"2015-08-25T18:05:43Z","pushed_at":"2015-08-24T18:15:04Z","git_url":"git://github.com/tumblr/colossus.git","ssh_url":"git@github.com:tumblr/colossus.git","clone_url":"https://github.com/tumblr/colossus.git","svn_url":"https://github.com/tumblr/colossus","homepage":"","size":6046,"stargazers_count":611,"watchers_count":611,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":45,"mirror_url":null,"open_issues_count":19,"forks":45,"open_issues":19,"watchers":611,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tumblr/colossus/pulls/249"},"html":{"href":"https://github.com/tumblr/colossus/pull/249"},"issue":{"href":"https://api.github.com/repos/tumblr/colossus/issues/249"},"comments":{"href":"https://api.github.com/repos/tumblr/colossus/issues/249/comments"},"review_comments":{"href":"https://api.github.com/repos/tumblr/colossus/pulls/249/comments"},"review_comment":{"href":"https://api.github.com/repos/tumblr/colossus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tumblr/colossus/pulls/249/commits"},"statuses":{"href":"https://api.github.com/repos/tumblr/colossus/statuses/b9f969430ca1731b89ab5eda77012231925f1b12"}}}}