{"action":"created","comment":{"url":"https://api.github.com/repos/akka/akka/pulls/comments/55803316","id":55803316,"diff_hunk":"@@ -38,62 +42,75 @@ private[http] object OutgoingConnectionBlueprint {\n                  +-------------------------------------->|  Merge   |                       |\n                  | Termination Backchannel          |    +----------+                       |  TCP-\n                  |                                  |                                       |  level\n-                 |                                  | Method                                |  client\n-                 |                +------------+    | Bypass                                |  flow\n+                 |                                  | BypassData                            |  client\n+                 |                +------------+    |                                       |  flow\n     responseOut  |  responsePrep  |  Response  |<---+                                       |\n     <------------+----------------|  Parsing   |                                            |\n                                   |  Merge     |<------------------------------------------ V\n                                   +------------+\n   */\n-  def apply(hostHeader: Host,\n+  def apply(hostHeader: headers.Host,\n             settings: ClientConnectionSettings,\n             log: LoggingAdapter): Http.ClientLayer = {\n     import settings._\n \n-    // the initial header parser we initially use for every connection,\n-    // will not be mutated, all \"shared copy\" parsers copy on first-write into the header cache\n-    val rootParser = new HttpResponseParser(parserSettings, HttpHeaderParser(parserSettings) { info ⇒\n-      if (parserSettings.illegalHeaderWarnings)\n-        logParsingError(info withSummaryPrepended \"Illegal response header\", log, parserSettings.errorLoggingVerbosity)\n-    })\n+    val core = BidiFlow.fromGraph(GraphDSL.create() { implicit b ⇒\n+      import GraphDSL.Implicits._\n \n-    val requestRendererFactory = new HttpRequestRendererFactory(userAgentHeader, requestHeaderSizeHint, log)\n+      val renderingContextCreation = b.add {\n+        Flow[HttpRequest] map { request ⇒\n+          val sendEntityTrigger =\n+            request.headers collectFirst { case headers.Expect.`100-continue` ⇒ Promise[Unit]().future }\n+          RequestRenderingContext(request, hostHeader, sendEntityTrigger)\n+        }\n+      }\n \n-    val requestRendering: Flow[HttpRequest, ByteString, NotUsed] = Flow[HttpRequest]\n-      .map(RequestRenderingContext(_, hostHeader))\n-      .via(Flow[RequestRenderingContext].flatMapConcat(requestRendererFactory.renderToSource).named(\"renderer\"))\n+      val bypassFanout = b.add(Broadcast[RequestRenderingContext](2, eagerCancel = true))\n \n-    val methodBypass = Flow[HttpRequest].map(_.method)\n+      val terminationMerge = b.add(TerminationMerge)\n \n-    import ParserOutput._\n-    val responsePrep = Flow[List[ResponseOutput]]\n-      .mapConcat(conforms)\n-      .via(new PrepareResponse(parserSettings))\n+      val requestRendering: Flow[RequestRenderingContext, ByteString, NotUsed] = {\n+        val requestRendererFactory = new HttpRequestRendererFactory(userAgentHeader, requestHeaderSizeHint, log)\n+        Flow[RequestRenderingContext].flatMapConcat(requestRendererFactory.renderToSource).named(\"renderer\")\n+      }\n \n-    val core = BidiFlow.fromGraph(GraphDSL.create() { implicit b ⇒\n-      import GraphDSL.Implicits._\n-      val methodBypassFanout = b.add(Broadcast[HttpRequest](2, eagerCancel = true))\n-      val responseParsingMerge = b.add(new ResponseParsingMerge(rootParser))\n+      val bypass = Flow[RequestRenderingContext] map { ctx ⇒\n+        HttpResponseParser.ResponseContext(ctx.request.method, ctx.sendEntityTrigger.map(_.asInstanceOf[Promise[Unit]]))","path":"akka-http-core/src/main/scala/akka/http/impl/engine/client/OutgoingConnectionBlueprint.scala","position":91,"original_position":88,"commit_id":"e3ee285574d17f5b401632760e6cbb3712c76669","original_commit_id":"c47272f422c6866dc9d500d90cd549738910925f","user":{"login":"viktorklang","id":10871,"avatar_url":"https://avatars.githubusercontent.com/u/10871?v=3","gravatar_id":"","url":"https://api.github.com/users/viktorklang","html_url":"https://github.com/viktorklang","followers_url":"https://api.github.com/users/viktorklang/followers","following_url":"https://api.github.com/users/viktorklang/following{/other_user}","gists_url":"https://api.github.com/users/viktorklang/gists{/gist_id}","starred_url":"https://api.github.com/users/viktorklang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viktorklang/subscriptions","organizations_url":"https://api.github.com/users/viktorklang/orgs","repos_url":"https://api.github.com/users/viktorklang/repos","events_url":"https://api.github.com/users/viktorklang/events{/privacy}","received_events_url":"https://api.github.com/users/viktorklang/received_events","type":"User","site_admin":false},"body":"How about we expedite the killSwitch-feature and use that from day 0?\n\n-- \nCheers,\n√\nOn Mar 11, 2016 09:39, \"Mathias\" <notifications@github.com> wrote:\n\n> In\n> akka-http-core/src/main/scala/akka/http/impl/engine/client/OutgoingConnectionBlueprint.scala\n> <https://github.com/akka/akka/pull/19943#discussion_r55802611>:\n>\n> >\n> > -    val core = BidiFlow.fromGraph(GraphDSL.create() { implicit b ⇒\n> > -      import GraphDSL.Implicits._\n> > -      val methodBypassFanout = b.add(Broadcast[HttpRequest](2, eagerCancel = true))\n> > -      val responseParsingMerge = b.add(new ResponseParsingMerge(rootParser))\n> > +      val bypass = Flow[RequestRenderingContext] map { ctx ⇒\n> > +        HttpResponseParser.ResponseContext(ctx.request.method, ctx.sendEntityTrigger.map(_.asInstanceOf[Promise[Unit]]))\n>\n> True. We are in fact relying on non-public features of the std library API\n> here, which are thus not protected by binary compatibility guarantees.\n> I didn't think of that...\n>\n> I'll submit a patch to get this fixed.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/akka/akka/pull/19943/files#r55802611>.\n>\n","created_at":"2016-03-11T08:47:12Z","updated_at":"2016-03-11T08:47:12Z","html_url":"https://github.com/akka/akka/pull/19943#discussion_r55803316","pull_request_url":"https://api.github.com/repos/akka/akka/pulls/19943","_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/55803316"},"html":{"href":"https://github.com/akka/akka/pull/19943#discussion_r55803316"},"pull_request":{"href":"https://api.github.com/repos/akka/akka/pulls/19943"}}},"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/19943","id":61547450,"html_url":"https://github.com/akka/akka/pull/19943","diff_url":"https://github.com/akka/akka/pull/19943.diff","patch_url":"https://github.com/akka/akka/pull/19943.patch","issue_url":"https://api.github.com/repos/akka/akka/issues/19943","number":19943,"state":"closed","locked":false,"title":"=htc #15799 implement client-side `Expect: 100-continue` support","user":{"login":"sirthias","id":135347,"avatar_url":"https://avatars.githubusercontent.com/u/135347?v=3","gravatar_id":"","url":"https://api.github.com/users/sirthias","html_url":"https://github.com/sirthias","followers_url":"https://api.github.com/users/sirthias/followers","following_url":"https://api.github.com/users/sirthias/following{/other_user}","gists_url":"https://api.github.com/users/sirthias/gists{/gist_id}","starred_url":"https://api.github.com/users/sirthias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirthias/subscriptions","organizations_url":"https://api.github.com/users/sirthias/orgs","repos_url":"https://api.github.com/users/sirthias/repos","events_url":"https://api.github.com/users/sirthias/events{/privacy}","received_events_url":"https://api.github.com/users/sirthias/received_events","type":"User","site_admin":false},"body":"Finally closes #15799 for good.\r\nSorry for the long delay in getting this done.\r\n\r\nThis also includes a fix to an oversight that somehow wasn't discovered so far.\r\nThe spec requires a response parser to accept and ignore interim 1xx informational responses, which akka-http (and spray) has not been doing up to now.\r\n\r\n/cc @jrudolph @2beaucoup ","created_at":"2016-03-03T11:45:47Z","updated_at":"2016-03-11T08:47:12Z","closed_at":"2016-03-09T09:14:58Z","merged_at":"2016-03-09T09:14:58Z","merge_commit_sha":"5476d139785b86cbc2e4bf651a5c8415329683d1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akka/akka/pulls/19943/commits","review_comments_url":"https://api.github.com/repos/akka/akka/pulls/19943/comments","review_comment_url":"https://api.github.com/repos/akka/akka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akka/akka/issues/19943/comments","statuses_url":"https://api.github.com/repos/akka/akka/statuses/e3ee285574d17f5b401632760e6cbb3712c76669","head":{"label":"spray:wip-15799-mathias","ref":"wip-15799-mathias","sha":"e3ee285574d17f5b401632760e6cbb3712c76669","user":{"login":"spray","id":688516,"avatar_url":"https://avatars.githubusercontent.com/u/688516?v=3","gravatar_id":"","url":"https://api.github.com/users/spray","html_url":"https://github.com/spray","followers_url":"https://api.github.com/users/spray/followers","following_url":"https://api.github.com/users/spray/following{/other_user}","gists_url":"https://api.github.com/users/spray/gists{/gist_id}","starred_url":"https://api.github.com/users/spray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spray/subscriptions","organizations_url":"https://api.github.com/users/spray/orgs","repos_url":"https://api.github.com/users/spray/repos","events_url":"https://api.github.com/users/spray/events{/privacy}","received_events_url":"https://api.github.com/users/spray/received_events","type":"Organization","site_admin":false},"repo":{"id":3809985,"name":"akka","full_name":"spray/akka","owner":{"login":"spray","id":688516,"avatar_url":"https://avatars.githubusercontent.com/u/688516?v=3","gravatar_id":"","url":"https://api.github.com/users/spray","html_url":"https://github.com/spray","followers_url":"https://api.github.com/users/spray/followers","following_url":"https://api.github.com/users/spray/following{/other_user}","gists_url":"https://api.github.com/users/spray/gists{/gist_id}","starred_url":"https://api.github.com/users/spray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spray/subscriptions","organizations_url":"https://api.github.com/users/spray/orgs","repos_url":"https://api.github.com/users/spray/repos","events_url":"https://api.github.com/users/spray/events{/privacy}","received_events_url":"https://api.github.com/users/spray/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spray/akka","description":"Akka Project","fork":true,"url":"https://api.github.com/repos/spray/akka","forks_url":"https://api.github.com/repos/spray/akka/forks","keys_url":"https://api.github.com/repos/spray/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spray/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spray/akka/teams","hooks_url":"https://api.github.com/repos/spray/akka/hooks","issue_events_url":"https://api.github.com/repos/spray/akka/issues/events{/number}","events_url":"https://api.github.com/repos/spray/akka/events","assignees_url":"https://api.github.com/repos/spray/akka/assignees{/user}","branches_url":"https://api.github.com/repos/spray/akka/branches{/branch}","tags_url":"https://api.github.com/repos/spray/akka/tags","blobs_url":"https://api.github.com/repos/spray/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spray/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spray/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/spray/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spray/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/spray/akka/languages","stargazers_url":"https://api.github.com/repos/spray/akka/stargazers","contributors_url":"https://api.github.com/repos/spray/akka/contributors","subscribers_url":"https://api.github.com/repos/spray/akka/subscribers","subscription_url":"https://api.github.com/repos/spray/akka/subscription","commits_url":"https://api.github.com/repos/spray/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/spray/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/spray/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/spray/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/spray/akka/contents/{+path}","compare_url":"https://api.github.com/repos/spray/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spray/akka/merges","archive_url":"https://api.github.com/repos/spray/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spray/akka/downloads","issues_url":"https://api.github.com/repos/spray/akka/issues{/number}","pulls_url":"https://api.github.com/repos/spray/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/spray/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/spray/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spray/akka/labels{/name}","releases_url":"https://api.github.com/repos/spray/akka/releases{/id}","deployments_url":"https://api.github.com/repos/spray/akka/deployments","created_at":"2012-03-23T15:57:31Z","updated_at":"2016-01-21T23:44:15Z","pushed_at":"2016-03-10T06:50:15Z","git_url":"git://github.com/spray/akka.git","ssh_url":"git@github.com:spray/akka.git","clone_url":"https://github.com/spray/akka.git","svn_url":"https://github.com/spray/akka","homepage":"http://akka.io","size":175268,"stargazers_count":11,"watchers_count":11,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":0,"forks":5,"open_issues":0,"watchers":11,"default_branch":"master"}},"base":{"label":"akka:master","ref":"master","sha":"85aa2197af70cb2a8e3b837572b9acfc34fd5003","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":130013,"name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?v=3","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka","description":"Akka Project","fork":false,"url":"https://api.github.com/repos/akka/akka","forks_url":"https://api.github.com/repos/akka/akka/forks","keys_url":"https://api.github.com/repos/akka/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka/teams","hooks_url":"https://api.github.com/repos/akka/akka/hooks","issue_events_url":"https://api.github.com/repos/akka/akka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka/events","assignees_url":"https://api.github.com/repos/akka/akka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka/tags","blobs_url":"https://api.github.com/repos/akka/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka/languages","stargazers_url":"https://api.github.com/repos/akka/akka/stargazers","contributors_url":"https://api.github.com/repos/akka/akka/contributors","subscribers_url":"https://api.github.com/repos/akka/akka/subscribers","subscription_url":"https://api.github.com/repos/akka/akka/subscription","commits_url":"https://api.github.com/repos/akka/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/akka/akka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka/merges","archive_url":"https://api.github.com/repos/akka/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka/downloads","issues_url":"https://api.github.com/repos/akka/akka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka/releases{/id}","deployments_url":"https://api.github.com/repos/akka/akka/deployments","created_at":"2009-02-16T12:51:54Z","updated_at":"2016-03-11T06:21:30Z","pushed_at":"2016-03-11T05:03:02Z","git_url":"git://github.com/akka/akka.git","ssh_url":"git@github.com:akka/akka.git","clone_url":"https://github.com/akka/akka.git","svn_url":"https://github.com/akka/akka","homepage":"http://akka.io","size":186921,"stargazers_count":5215,"watchers_count":5215,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1600,"mirror_url":null,"open_issues_count":829,"forks":1600,"open_issues":829,"watchers":5215,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/19943"},"html":{"href":"https://github.com/akka/akka/pull/19943"},"issue":{"href":"https://api.github.com/repos/akka/akka/issues/19943"},"comments":{"href":"https://api.github.com/repos/akka/akka/issues/19943/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/akka/pulls/19943/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/akka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akka/akka/pulls/19943/commits"},"statuses":{"href":"https://api.github.com/repos/akka/akka/statuses/e3ee285574d17f5b401632760e6cbb3712c76669"}}}}