Commit graph

182 commits

Author SHA1 Message Date
Björn Antonsson
789b7c843d Merge pull request #16108 from spray/w/port-more-directives
Fixes for 15931, 15918, 15919
2014-10-21 17:28:36 +02:00
Johannes Rudolph
689e7eb56a +htp add RequestContext/BasicDirectives.withLog/extractLog 2014-10-21 15:56:31 +02:00
Johannes Rudolph
cfcb88cf91 !htp rename conflicting withExecutionContext directive to extractExecutionContext 2014-10-21 15:56:31 +02:00
Johannes Rudolph
8116d2b9bb +htp #15919 import CookieDirectives 2014-10-21 15:56:31 +02:00
Johannes Rudolph
37da572d2d +htp #15918 import CacheConditions from spray 2014-10-21 15:56:30 +02:00
Benjamin Thuillier
c6f8eb95a1 +htp #15931 Import RespondWithDirectives from spray 2014-10-21 15:56:30 +02:00
Mathias
0033e74cae !htp #16101 improve basic directive infrastructure, add more scaladoc, fix smaller problems 2014-10-21 14:12:01 +02:00
Mathias
9211b71c99 +htp #15929 port ParameterDirectives from spray 2014-10-21 14:12:01 +02:00
Mathias
33ddabbc9f =htp refactor tuple join to foldLeft-based implementation, unify tuple operations 2014-10-21 14:12:01 +02:00
Mathias
93c6a90e4e !htp #15935 clean up and extend unmarshalling infrastructure 2014-10-21 14:12:01 +02:00
Mathias
284a0fe61d =htp small improvement to Marshaller 2014-10-21 14:12:01 +02:00
Mathias
129958d039 =htp add support infrastructure for folding over tuples with a binary poly-function 2014-10-21 14:12:00 +02:00
Björn Antonsson
bca586a7dd Merge pull request #16091 from spray/w/15924-future-directives
+htp #15924 import FutureDirectives from spray
2014-10-21 13:42:49 +02:00
Johannes Rudolph
5870c4ab90 +htp #15924 import FutureDirectives from spray 2014-10-21 11:12:10 +02:00
Konrad Malawski
7053295de9 Merge pull request #16100 from spray/wip-16099-mathias
=htc,htp #16099 remove all special treatment for ISO-8859-1, switch to U...
2014-10-17 15:38:30 +02:00
Björn Antonsson
0f61909ea7 !str #16102 Fold Tap/Drain into Source/Sink
* Fold Tap/Drain into Source/Sink
* Create Source/Sink helpers to create all Sources/Sinks
* Make concrete Source/Sink implementations private[scaladsl2]
2014-10-17 14:05:50 +02:00
Mathias
ea7f3ff9fc =htc,htp #16099 remove all special treatment for ISO-8859-1, switch to UTF-8 as default charset everywhere 2014-10-16 14:14:23 +02:00
Johannes Rudolph
4285f57bc3 !htp renaming: mapRouteResponse => mapRouteResult, mapHttpResponse => mapResponse 2014-10-14 12:23:13 +02:00
Johannes Rudolph
4d0e1ba231 !htp #16088 replace RouteResult.Failure by Future.failed + handle post-processing directly in Directives
This replaces the awkward post-processing previously done with RequestContext.finish and
prevents the loop-hole of Future.failed which previously allowed errors
to be missed by the current ExceptionHandler.
2014-10-14 12:23:13 +02:00
Johannes Rudolph
0e06406e19 !htp convert List[Rejection] => immutable.Seq[Rejection] everywhere 2014-10-13 18:03:46 +02:00
Johannes Rudolph
2178e6a373 =htp #16063 fail on data truncation for GZIP coding 2014-10-10 16:52:15 +02:00
Johannes Rudolph
6170655b19 =htp #15921 import CodingDirectives from spray 2014-10-10 16:52:15 +02:00
Johannes Rudolph
13fb925fe9 =htp #16064 fail properly and early if Gzip header is corrupt 2014-10-10 16:39:28 +02:00
Endre Sándor Varga
ed27f86791 !htc #15726: Akka HTTP with the new DSL 2014-10-10 13:51:36 +02:00
Björn Antonsson
a47fee4fda Merge pull request #15982 from bthuillier/release-2.3-dev
+htp #15932 Import SchemeDirectives from spray
2014-10-09 22:41:45 +02:00
Benjamin Thuillier
0966bf6233 +htp #15932 integrate SchemeDirectives from spray codebase 2014-10-09 17:11:33 +02:00
Björn Antonsson
7cc9e9902f Merge pull request #15985 from bthuillier/feature/directives-migration
Spray Directives Migration
2014-10-09 13:46:50 +02:00
Benjamin Thuillier
b98f21cb80 +htp #15928 Import MiscDirectives from spray 2014-10-07 14:08:31 +02:00
Benjamin Thuillier
6ad7622621 +htp #15925 Import HeaderDirectives from spray 2014-10-07 14:05:12 +02:00
Mathias
46d51e531f =htp reduce set of not-encoded characters in FormData marshalling
Port of https://github.com/spray/spray/pull/918
2014-10-07 12:02:13 +02:00
Mathias
9347bf57e7 =htp port FromEntityUnmarshaller[FormData] from spray, closes #15966 2014-10-06 10:41:58 +02:00
Mathias
6e3f4ff3d5 =htp fix UnmarshallerLifting to not obscure missing Unmarshaller errors with implicit diversions
Unfortunately implicit resolution evaluates type boundaries only quite late in the resolution process which can lead to fake implicit diversions errors. Getting rid of the type boundary here make debugging Unmarshaller type class problem easier.
2014-10-06 10:41:55 +02:00
Mathias
f7d7a289f3 =htp fix UnsupportedOperationException in PathMatchers.valueMap2PathMatcher 2014-10-06 10:41:54 +02:00
Johannes Rudolph
fb98d1aa69 +htp #15910 import + improve coding infrastructure from spray 2014-10-02 15:22:06 +02:00
Benjamin Thuillier
a2bcc0fb06 +htp #15926 Import HostDirectives from spray 2014-09-26 11:39:03 +02:00
Björn Antonsson
ad1ad44fcc Merge pull request #15975 from spray/wip-15962-mathias
Remove `Deferrable[T]` and replace with POF (plain old Future)
2014-09-26 11:27:34 +02:00
Mathias
0afebd1c39 !htc Tighten up header model some more, update spec links 2014-09-25 16:48:03 +02:00
Mathias
ad26a32e83 !htp,htk Upgrade from Deferrable to new FastFuture, closes #15962 2014-09-25 14:56:34 +02:00
Johannes Rudolph
c77f4e28f6 !hco #15915 introduce more shades of HttpEntities
The introduction of BodyParts again showed that not all entity types are
useful for every kind of context. There are now these contexts where
HttpEntities are used:
 - requests
 - responses
 - body parts

And several kinds of entities:
 - Strict
 - Default
 - Chunked
 - CloseDelimited
 - IndefiniteLength

To increase type safety of the API marker-interfaces are introduced defining
which kinds of entities can be used in which contexts:
 - RequestEntity: Strict, Default, Chunked
 - ResponseEntity: Strict, Default, Chunked, CloseDelimited
 - BodyPartEntity: Strict, Default, IndefiniteLength

Also, to be able still to provide abstractions over some kinds of entities
additional auxiliary interfaces were necessary:
 - MessageEntity = RequestEntity >: ResponseEntity: Strict, Default, Chunked (type alias for RequestEntity)
 - UniversalEntity = RequestEntity with ResponseEntity with BodyPartEntity = Strict, Default
2014-09-22 12:03:33 +02:00
Johannes Rudolph
1e6a844dc1 !hco make Marshaller(s) covariant in result type 2014-09-22 11:55:15 +02:00
Mathias
27a7cb0664 !htk move RequestBuilding trait from akka.http.testkit into akka.http.clien package, closes #15801 2014-09-17 16:49:34 +02:00
Mathias
47affda004 !htp rename akka.http.routing package to akka.http.server 2014-09-17 16:42:31 +02:00
Mathias
8dbb311ddc =htp Add akka-http-tests project, tests for already-ported directives
Also move the tests that were previously in the akka-http project here
2014-09-11 17:15:50 +02:00
Mathias
69888693b8 !htp port over routing DSL core from spray, other improvements
The most important changes from spray-routing:
- Change Route from `RequestContext => Unit` to `RequestContext => Deferrable[RouteResult]`
- Switch directive extraction model from shapeless HLists to plain Scala Tuples
- Switch API from promoting actors as Route "containers" to being powered by plain executors/flow-materializers
- Make `Directive0` re-execute inner routes per requests, refs spray/spray#780

Other fixes:
- Simplify unmarshalling infrastructure, now based on `Deferrable`, closes #15690
- Change marshalling infrastrucutre to be based on `Deferrable` as well
- Clean up `akka.http` package contents, closes #15689

Changing from HList-based extractions to Tuple-based ones comes with one important drawback:
We can't rely on type bounds anymore to tighten and auto-document the API where generic extractions handled.
Currently we therefore fall back to context bounds where they add value, but this might change if the added overhead or code complexity becomes too much. We'll see when the remaining parts of spray-routing are ported.
2014-09-11 17:12:32 +02:00
Konrad 'ktoso' Malawski
cc4fd5ca2c !str #15121 MaterializerSettings now uses a config object
Resolves #15121
2014-09-01 19:21:57 +02:00
Konrad 'ktoso' Malawski
5b1c05f3fe !str #15271 make transform() take a factory instead of Transformer
+ Makes reusing flows safe
+ Adds timerTransform for ops which need TimerTransformer
+ Adds TransformerLike in order to keep transform/timerTransform
  typesafe in respect to the passed in type og Transformer

Resolves #15271
2014-08-22 14:21:02 +02:00
Patrik Nordwall
1bb5d37780 !str #15551 Switch to implicit passing of FlowMaterializer
* implicit param
* change tests to use implicit materializer
* add ActorFlow trait that provides an implicit materializer inside an actor
  in the right way, i.e. encourage usage of that instead of
  implicit def mat(implicit arf: ActorRef): FlowMaterializer
* make http compile, but those who know the api better will have to adjust
  to take full advantage of the implicit materializer
2014-08-21 13:40:43 +02:00
Mathias
e7ef23f6f8 =htp Apply remaining review feedback 2014-08-06 00:20:12 +02:00
Mathias
3747196356 =htp Add more multipart unmarshalling tests 2014-08-05 20:11:18 +02:00
Mathias
1c3bd3817e =hco,htp Upgrade to latest release-2.3-dev head 2014-08-05 20:11:18 +02:00