Commit graph

802 commits

Author SHA1 Message Date
Patrik Nordwall
f07041091f Merge pull request #20660 from akka/wip-20659-leaking-tests-patriknw
fix memory leaks in tests, #20659
2016-05-31 19:34:55 +02:00
Robert Budźko
3e5e7175a9 htp #20392 ControllerStage should complete when parsing of request failed and bad request response sent. (#20596) 2016-05-31 14:54:32 +02:00
Patrik Nordwall
be448e9fbb fix memory leaks in tests, #20659 2016-05-31 08:51:00 +02:00
Konrad Malawski
9be0ea6c11 =htc #20602 avoid checking racy value if we don't really care (#20617) 2016-05-30 10:42:00 +02:00
Hawstein
f61a67d57a make OneHundredContinueStage an object 2016-05-19 22:52:49 +08:00
Hawstein
cc2e0e8d32 replace PushPullStage with GraphStage in HttpServerBluePrint 2016-05-19 03:40:02 +08:00
Johan Andrén
29029be31d !htp #18919 #19519 New JavaDSL for Akka HTTP (#20518)
* !htt #18919 #19519 Align Java HTTP server DSL with Scala

This commits replaces the Java HTTP server DSL with a Java-8 centric one
which exposes all scala DSL concepts to be usable from Java, including
custom directives, (un)marshallers, rejections, headers, and type safety
for path and query parameters.

* Add RequestContext and RouteResult to Java DSL
fix websockets
WIP bring java docs up to date.
This applies some updates to the root-level documentation

* [htp] Fix java documentation to correctly mention timeouts

Timeouts are configured the same in Java and Scala. Hence, linking to the
scala docs for timeouts from Java.

* =htc fix optionalHeaderValueByType in Java

* =htt #20200 fix java testkit always using NoLogging instead logger

* +htt actually run new javadsl tests, allow overriding config

* =htt improve javadsl test infra with more details when fails

* =htt fix bug in wrong path matcher exposed

* +htp add missing remaining path matcher

* =htp Java DSL cookie tests fixed

* =htt Java DSL ParameterDirectivesTest fixed

Protect the tweets from scalariform

Incorrect response expectations in cache condition directives spec fixed

* =htt Path directives for Java DSL

* +!htt PathMatchers rewritten, made uniform and tests passing

* Bugfix in java reject and a little test-boyscouting

* Revert "Incorrect response expectations in cache condition directives spec fixed"

This reverts commit cd50e89d45db010309f8249b090ea654ebb11c7a.

* +htc HttpAPIsTest is compile time only, not for running
Also, moved from the client package since not strictly a client test.

SecurityDirectives passing

Two faulty tests and two actual bugs.

Fix for cache condition spec not working

* Not sending in Unit instad of the implicit magnet in the test
* HeaderMagnet now works as expected
* Java API added for - and + on DateTime

PetStore example and test fixed

* Annotations to make marshalling work without default constructor
* Made model class immutable

Incorrect tests fixed

Some scaladoc boyscouting as bonus

* =htt RequestValTest sprinkled out across multiple directive tests

Client ip extraction test with incorrect header name fixed.

* =htt Incorrect CodingDirectivesTest fixed.

* =htt Bugfix for Java Unmarshaller.firstOf and fixes to JavaRouteTest

* =htt MarshallerTest fixed

* Missing seal signature added to JavaDSL
* More consistent (with Scala) test kit setup for Java
* missing Javadocs added
* Thread.sleep in default exception handler removed

* =htt copy directive docs, prepare for finishing it up

* +htt SecurityDirectives.authorize variants and test coverage added

* +htt Custom headers in Java DSL

* =htt WIP on java docs

* +htp add missing parameterOrDefault directive
Fixed a lot of doc warnings

* =htc intense progress on javadsl docs

* =htc #20470 Link to issue about docs and fix compile error
compile, migration guide
don't mima check http-experimental

* =htt Java DSL doc warnings fixed.
Only `Could not lex literal_block` ones left now

* =htc fix mima settings

* =doc fix MethodDirectives doc test with custom method

* =htc fix coding directives spec after bad merge

* =htc fix concat being corresponding to route() in javadsl

* =htt Disable consistency check for route/concat as it fails only on ci server

* !htt Minor fixes to PathMatchers
2016-05-16 10:38:40 +02:00
Alexander Temerev
8892eec62f Test spec for Strict-Transport-Security added 2016-05-12 10:05:40 +02:00
atemerev
1a6b832295 Reverted to maintain binary compatibility; extra fields allowed in Strict-Transport-Security 2016-05-12 10:05:40 +02:00
atemerev
3921eeda94 Added preloaded field to Strict-Transport-Security header in akka-http headers model 2016-05-12 10:05:40 +02:00
Konrad Malawski
d886a1d0b5 htc #20379 allow registering custom media types (#20401)
htc #20379 add mima filters for custom media type
2016-05-12 09:46:29 +02:00
Johan Andrén
0aea3af0ad =htc #19650 expse effectivePort on Uri, better port handling
* =htc #19650 Public access to effectivePort in Uri

* =htc #19650 normalize port as late as possible
2016-05-12 08:55:06 +02:00
2beaucoup
86f54e8719 =htc convert from identity to ConstantFun.scalaIdentityFunction (#20467) 2016-05-06 23:59:49 +02:00
Bernard Leach
2420b96bc6 =htc make HttpMessageParser use GraphStage #19225 (#20385) 2016-05-06 11:24:42 +02:00
Robert Budźko
92a08ab1d0 htc #20388 HttpServerBluePrint is now resilient to the response being handled before the scheduled timeout response for same exchange. (#20458) 2016-05-06 11:01:51 +02:00
2beaucoup
bc7cd17bee =htc Various minor cleanups (#20451)
* minor fixes

* remove now superfluous buffer from MultipartUnmarshaller

* remove unused TokenSourceActor

* remove FIXME: add tests, see #16437

* removed unused param remoteAddress (comment: TODO: remove after #16168 is cleared)

* convert FIXME to TODO (#18709)

* reenable tests in {Request|Response}RendererSpec due to fixed #15981

* remove logging workaround in StreamTestDefaultMailbox due to fixed #15947
2016-05-06 10:32:06 +02:00
Robert Budźko
fbe383722c htc #20362 Expire defaults when HTTP-date is not possible to parse (#20362)
* Expire defaults when HTTP-date is not possible to parse (#20362) and  'If-Modified-Since' is more strict (excluding 0 - rfc 7232 3.3).

* Fixed reversed missing method MiMa problem (#20131) and 'expires' instead of 'expire' wording.

* HTTP-date should match '0' as DateTime.MinValue after all.
2016-04-28 23:34:10 +02:00
2beaucoup
7913e25257 =htp #20338 correct byte range slicing (#20382) 2016-04-28 19:43:58 +02:00
Konrad Malawski
2aa3d7bb1d htc #20403 fix initialization of deprecated field (#20411) 2016-04-28 13:15:14 +02:00
Konrad Malawski
5be23f263b htc #20398 fix missing param delegation in javadsl https (#20399) 2016-04-27 10:02:14 +02:00
Bernard Leach
3af02c3bf9 =htc replace printEvent with Flow[T].log #20288 (#20384) 2016-04-25 17:48:26 +02:00
Konrad Malawski
0e11ec2057 !htc #20371 allows for simple HTTPS usage from Java, fixes typo in APIs (#20373) 2016-04-25 12:01:03 +02:00
Michał Kiędyś
b983f19c1f Add basic support for Java 7 NIO file systems (#20293) 2016-04-25 11:25:26 +02:00
Johan Andrén
531f0afc66 htt #17542 and #20298 resource leak test coverage and fix (#20300) 2016-04-22 15:43:50 +02:00
Ganeshwara Herawan Hananda Putra
604ecad732 Adding javadsl.model.MediaType.Compressibility (#20378)
* Adding javadsl.model.MediaType.Compressibility

* using akka.japi.Util seq conversion method
2016-04-22 12:33:16 +02:00
Giovanni Caporaletti
54f73f9329 support HttpEntity.with/withoutSizeLimit in scaladsl HttpEntity, #20342
also add a missing test for withSizeLimit
2016-04-20 15:33:12 +02:00
Daniel Moran
c8352c04c4 Migrate BodyPartParser to GraphStage #20288. 2016-04-19 19:04:31 -07:00
Konrad Malawski
6e1b32e6ea htp #20214 more docs on https context configuring 2016-04-09 02:30:28 +02:00
Konrad Malawski
4750698a03 htp #20214 allow workaround for disabling SNI 2016-04-08 15:43:10 +02:00
Samuel Tardieu
81579bd403 =htc #20080,#20081,#20082 Simplify pool gateway synch
* Rewrite the pool gateway synchronization

Rewrite the pool gateway synchronization so that:
- The documented race condition in PoolInterfaceActor is gone. No
  PoolInterfaceActor will receive new requests after the gateway
  shutdown has been initiated (fix #20081).
- A gateway created using newHostConnectionPool will no longer
  share its pool with others even when it has been shutdown
  due to idle-timeout and recreated. Also, its original
  materializer will be used to create all the successive
  pools incarnations (fix #20080).
- Collapsing chains of gateways do no longer need to be created.
  The gateways are now only an entrypoint to the pool master
  actor, and this actor is in charge of keeping a cache of
  currently active pools and recreate them from the information
  given by the gateway when needed.

* Add copyright header

* Mark PoolMasterActor as INTERNAL API

* Larger outer timeout

* Define Props in PoolMasterActor object

* Comment INTERNAL API

* Remove unused import
2016-04-08 15:26:42 +02:00
2beaucoup
78b88c419d =htc #20236 enable streaming responses with Connection: close (#20254) 2016-04-07 19:15:18 +02:00
Bernard Leach
7d00d4194f =htc #19834 replace StreamUtils.identityFinishReporter with Flow.watchTermination 2016-04-07 08:26:31 +10:00
Bernard Leach
f24b227586 =htc Refactor StreamUtils.identityFinishReporter to Future[Done] 2016-04-06 23:37:01 +10:00
Bernard Leach
174f812e99 Refactor anon GraphStageWithMaterializedValue to object 2016-04-06 23:28:48 +10:00
Bernard Leach
7357571c82 =htc #19834 convert StreamUtils.identityFinishReporter to GraphStage 2016-04-06 20:35:43 +10:00
Alan Johnson
b3c85512a3 htp #19678 add variadic concat route combinator
* add variadic route concatenation function

* add `concat` to `~` warning bubble in docs

* fix grammar of warning bubble, and clarify
2016-04-05 15:36:46 +02:00
Bernard Leach
09d5072f2c =htc #16394 Remove StreamUtils.recover, Flow.recover is now available 2016-04-05 14:25:07 +02:00
Bernard Leach
d9f82d71eb htc #19834 convert streamutils to GraphStages graphstage
* =htc #19834 replace byteStringTransformer with GraphStage implementation

* =htc #19834 replace mapErrorTransformer with GraphStage implementation

* htc #19834 replace sliceBytesTransformer with GraphStage implementation

* htc #19834 inline mapErrorTransformer with simple recover Flow
2016-04-05 14:02:40 +02:00
Bernard Leach
4a8018f63f =htc #19834 Replaced PushStage based captureTermination with GraphStage
* Move promise completion success into postStop to simplify impl
2016-04-04 13:37:09 +02:00
Nafer Sanabria
b6b017902f Remove 'the' duplicates 2016-03-31 16:20:15 -05:00
Patrik Nordwall
bc660a7403 Merge pull request #20085 from agolubev/19834-Replace-UTF8Encoder-with-GraphStage
=str #19834 Replave UTF8Encoder with GraphStage
2016-03-31 20:45:45 +02:00
Patrik Nordwall
6675f68bf7 Merge pull request #20060 from leachbj/fix-19953-bl
=htc #19953 Complete Promise in captureTermination onDownstreamFinish
2016-03-31 17:58:53 +02:00
Alexander Golubev
bcd52fb90a =str #19834 Replave UTF8Encoder with GraphStage 2016-03-31 11:07:12 -04:00
drewhk
1596ae7f13 Merge pull request #20189 from drewhk/wip-19777-truncation-exception-drewhk
#19777 OutputTruncation should be only reported if there is proof of it
2016-03-31 14:58:23 +02:00
Endre Sándor Varga
4b76e32058 #19777 OutputTruncation should be only reported if there is proof of it 2016-03-31 13:53:36 +02:00
Bernard Leach
89a6187efc =htc #19953 Complete Promise in captureTermination onDownstreamFinish
PoolSlot uses StreamUtils.captureTermination to determine when the
associated request is completed, when a request from the pool was
subsequently used as a response by a server Flow the rendering
process would cancel the subscription to the Source but that
would not complete the Promise in StreamUtils.captureTerminate and so
the SlotEvent.RequestCompleted would not be generated.
2016-03-31 22:15:58 +11:00
Konrad Malawski
ca61a4eec4 Merge pull request #20181 from lolski/lolski-issue-19976-javadsl-wip
Adding HTTP Java DSL
2016-03-31 13:09:27 +02:00
drewhk
cc5adc632c Merge pull request #19895 from drewhk/wip-19892-killswitch-drewhk
#19892: KillSwitch (externally controllable stream completion)
2016-03-31 12:10:58 +02:00
drewhk
982243b49a Merge pull request #19913 from vans239/19910-checkContentLength
Replaced PushStage based CheckContentLength with GraphStage #19834
2016-03-31 11:55:08 +02:00
Endre Sándor Varga
2cb4d42087 19892: KillSwitch (controllable stream completion) 2016-03-31 10:51:59 +02:00