Commit graph

916 commits

Author SHA1 Message Date
Benjamin Thuillier
a2bcc0fb06 +htp #15926 Import HostDirectives from spray 2014-09-26 11:39:03 +02:00
Björn Antonsson
49f2e8bcf5 Merge pull request #15969 from spray/wip-15490-mathias
Improve handling of `Transfer-Encoding` header
2014-09-26 06:25:02 +02:00
Mathias
36904eadcb =htc Improve handling of Transfer-Encoding header, closes #15490 2014-09-25 16:53:44 +02:00
Mathias
0afebd1c39 !htc Tighten up header model some more, update spec links 2014-09-25 16:48:03 +02:00
Mathias
a2cf6cf228 !htc Remove obsolete ProtectedHeaderCreation construct 2014-09-25 16:48:03 +02:00
drewhk
82d4963382 Merge pull request #15940 from drewhk/wip-15498-dont-close-after-head-closedelimited-drewhk
Implement transparent HEAD support
2014-09-25 15:22:01 +02:00
Endre Sándor Varga
8fad19c88c +hco #15498: Transparent HEAD support
- don't close on HEAD request when sending CloseDelimited
2014-09-25 15:21:17 +02:00
Björn Antonsson
fb96a2964b Merge pull request #15967 from spray/w/15635-http-remove-all-global-state
!hco #15635 reorganize registration of predefined, custom HTTP primitives + other small improvements
2014-09-25 15:12:03 +02:00
Johannes Rudolph
dc2737d186 =hco don't reject headers that refer to charsets or methods not available on the current platform 2014-09-25 13:41:26 +02:00
Johannes Rudolph
4ba1ce9149 !hco #15635 reorganize registration of predefined, custom HTTP primitives
- No more global registration
 - In most cases registration isn't necessary at all
 - Creation of custom HttpMethod and StatusCode is possible through
   a configuration setting in ParserSettings

Fixes #15635.
2014-09-25 13:41:26 +02:00
Björn Antonsson
35867800f9 Merge pull request #15949 from akka/wip-15948-fanout-cancel-upstream-bug-ban
=str #15948 Make Broadcast cancel upstream when all downstreams have canceled
2014-09-23 12:51:28 +02:00
Björn Antonsson
dfbe88c252 =str #15948 Make Broadcast cancel upstream when all downstreams have canceled 2014-09-22 15:09:26 +02:00
Björn Antonsson
17c7df6fdd Merge pull request #15941 from spray/w/15915-restructure-HttpEntity-hierarchy
!hco #15915 introduce more shades of HttpEntities
2014-09-22 13:57:08 +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
Björn Antonsson
2bdfea25c7 Merge pull request #15895 from richdougherty/richd-http-integration-2.3
+hco Make `Content-Length` header public again and add integration tests
2014-09-22 11:16:06 +02:00
Rich Dougherty
8588fb9fbf !hco Make Content-Length and Content-Type visible but not constructible
This makes the `Content-Length` and `Content-Type` types visible - but not
constructible - outside of Akka HTTP. The change partially reverts #15800.
the http package. The types need to be visible so that Play can access
all parsed headers. However they types are not constructible outside Akka
HTTP because it is not desirable for users to create these headers. Users
should set the Content-Length and Content-Type via the members of the
HttpEntity objects.

Includes integration tests in the io.akka package to ensure that objects
have correct visibility outside akka.http.
2014-09-19 14:21:07 +12:00
Roland Kuhn
5a0b71a460 Merge pull request #15936 from spray/wip-15801-mathias
Restructure HTTP package structure, move `RequestBuilding` trait from testkit into `http` module
2014-09-17 18:21:06 +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
1f32faeb96 !htc move akka.http.{client,server,parsing,rendering} underneath akka.http.engine package 2014-09-17 16:39:55 +02:00
Mathias
b367613110 =htc move source files into directories for new package structure 2014-09-17 16:26:23 +02:00
Mathias
88d71500ca =htc Fix flow transformer naming error 2014-09-17 16:02:01 +02:00
Roland Kuhn
301ca3980d Merge remote-tracking branch 'pr/15886' into release-2.3-dev 2014-09-17 12:52:23 +02:00
Björn Antonsson
a86c4528a7 Merge pull request #15891 from akka/wip-15406-split-streams-dependency-ban
+pro #15406 Split up stream into testkit, tests and tck
2014-09-16 11:44:56 +02:00
Björn Antonsson
a902d079b0 +pro #15406 Split up stream into testkit, tests and tck 2014-09-16 10:16:38 +02:00
Konrad 'ktoso' Malawski
fe17e8a823 =str #15885 fix outdated error message in StreamTestDefaultMailbox 2014-09-15 02:28:12 +02:00
drewhk
f73bfc6da1 Merge pull request #15877 from drewhk/wip-15764-graph-concat-drewhk
+str #15764: Add concat combinator
2014-09-12 16:28:16 +02:00
Endre Sándor Varga
ff2b3d1dd2 fix wrong depletion handling 2014-09-12 15:25:12 +02:00
Endre Sándor Varga
6643d19e70 +str #15764: Add concat and zip combinator 2014-09-12 15:10:33 +02:00
Patrik Nordwall
67cf00221f Merge pull request #15878 from akka/wip-15869-preconditions-patriknw
=str #15869 Re-enable flow graph checks
2014-09-12 14:56:31 +02:00
Patrik Nordwall
c2d8891cd8 =str make some FlowGraph things akka internal 2014-09-12 14:46:54 +02:00
Björn Antonsson
20ecaddc28 Merge pull request #15857 from akka/wip-15852-flow-tests-scaladsl2-ban
=str #15852 Port remaining Flow tests to new DSL
2014-09-12 13:53:27 +02:00
Björn Antonsson
d8a6b40983 Merge pull request #15876 from spray/w/strip-down-shapeless
=par more shapeless strip-down and comment cleanup
2014-09-12 13:41:01 +02:00
Patrik Nordwall
419daa7a86 =str #15869 Re-enable flow graph checks 2014-09-12 13:16:11 +02:00
Patrik Nordwall
55f5dac241 Merge pull request #15860 from akka/wip-flow-doc-patriknw
=str Add some rough overview docs of the new scaladsl package
2014-09-12 13:14:08 +02:00
Patrik Nordwall
33e517f633 =str Add some rough overview docs of the new scaladsl package 2014-09-12 13:09:08 +02:00
drewhk
19edd18787 Merge pull request #15837 from drewhk/wip-graph-merge-drewhk
Graph operations merge, broadcast
2014-09-12 13:08:30 +02:00
Björn Antonsson
07025a112c =str #15852 Port remaining Flow tests to new DSL 2014-09-12 12:05:05 +02:00
Endre Sándor Varga
b0fd60e1ed +str #15762: Implement merge and broadcast 2014-09-12 12:04:42 +02:00
Johannes Rudolph
95801c00e7 =par more shapeless strip-down and comment cleanup
Follow up to #15867.
2014-09-12 12:03:56 +02:00
Roland Kuhn
ae6fed91f9 Merge pull request #15867 from spray/w/strip-down-shapeless
!par strip down shapeless2 to the bare minimum needed
2014-09-12 11:08:18 +02:00
Johannes Rudolph
eb93fe17f7 !par strip down shapeless2 to the bare minimum needed 2014-09-11 20:05:35 +02:00
Roland Kuhn
f9e4f7f745 Merge pull request #15718 from spray/w/setup-akka-http-routing
=htp groundwork for routing and a first, basic set of directives
2014-09-11 18:23:41 +02:00
Patrik Nordwall
e9b3c2bdf1 Merge pull request #15866 from akka/wip-FutureSink-patriknw
=str FutureSink must not be singleton
2014-09-11 17:26:17 +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
af8591b5e9 +htk Add akka-http-testkit as a port of spray-testkit
Currently the Specs2 support is still missing.
2014-09-11 17:14:19 +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
Mathias
e8c7dc2d58 !htc apply various upgrades and improvements
Most importantly
- Switch to implicit FlowMaterializers, refs #15716
- Introduce new `Deferrable` abstraction
- Remove `EnhancedSeq`
2014-09-11 16:54:15 +02:00
Patrik Nordwall
30095e5386 =str FutureSink must not be singleton
* and more careful use of  Source / Sink in Maps
2014-09-11 16:08:16 +02:00