akka/akka — pull request #16089 by jrudolph (2014-10-13 16:24:12+00:00)
Title: 16087, 16088 fix RouteResult handling support in routing infrastructure

This contains a pretty important change that fixes a long-standing oddity about which part of the routing infrastructure should deal with continuations (see #16088). "Continuations" are used in the routing DSL to support that directives which enclose other routes are able to manipulate the result of the inner route. Previously, this support was built into RequestContext. spray used mapped UnregisteredActorRefs to support this feature, and in akka-http we used `RequestContextImpl.finish` for that purpose. We figured that `RequestContext` isn't the right place to deal with result side data transformation. Instead, it belongs very naturally into `Directive` which is the place which actually allows the nesting DSL in spray/akka-http and, therefore, should also deal with the continuation.

We need a bit more infrastructure in FastFuture for this purpose which another commit provides.

Fixes #16087, #16088.

/cc @sirthias