Commit graph

94 commits

Author SHA1 Message Date
Hawstein
cf46ab887f +htc #20771 provide different options to deal with the illegal response header value (#20976) 2016-07-24 17:56:39 +02:00
Konrad Malawski
fde9d86879 ByteString optimisations of methods in HTTP parsing hot-path (#20994)
* =act #20992 prepare benchmarks for ByteString optimisations

* =act #20992 optimise common ByteString operations: drop,take,slice...

* =act,htc #15965 add ByteString.decodeString(java.nio.charsets.Charset)
2016-07-20 14:01:51 +02:00
Kam Kasravi
1d692daaad Fixes #20543 GraphStage subtypes should not be private to akka 2016-07-05 17:12:35 -07:00
Patrik Nordwall
8b274ebc62 ignore PubSub Status message from unknown node, #20846 (#20847)
* ignore PubSub Status message from unknown node, #20846

Reproducer:
1. old cluster of node1, node2 and node3
2. shutdown node3 and start it again with same host:port, let it
   join itself and not the old cluster
3. node1 and node2 will continue to gossip to the node3 address and
   Status message is accepted and replied to (Delta is ignored from
   unknown node)

Solution:
* ignore status message from unknown node
* also added a reply flag in the Status message to break the
  back-and-forth replies in case the deltas are not accepted,
  this is not needed for fixing this bug, but it adds an extra
  level of safety
2016-07-01 12:12:23 +02:00
Patryk Jażdżewski
62b4ecf67c +htc #20456 Add hot connection pool via the minConnections setting (#20723)
* 20456: add hot connection pool via the minConnections setting

* added the akka.http.host-connection-pool.min-connections setting to reference.conf
* modified config implementation s o it's being read, with 0 as default
* based on the setting two types of pools will be created - hot and cold
* hot ones will start ASAP and not close when the number of active connections fall to 0

* PR remarks: english, remove getIntOpt ...

Moving logic into PoolConductor WIP

* WIP: moving minConnections logic into PoolConductor, needs more precise tests

* added testing via expectNextN in ConnectionPoolSpec.scala; fixed the bug with skipping the actor state in PoolSlot

* fix comments from PR: make sure PoolConductor produces only SwitchSlotCommand

* fix typo: slotSettings -> slots

* Fix style after code review
- inline short snippets
- shorter Mima
- better naming
- make SlotCommands final
2016-06-27 10:55:39 +02:00
Hawstein
cc22ed4560 +doc example snippet for akka http java dsl: SecurityDirectives (#20717) 2016-06-19 02:06:19 +02:00
Bernard Leach
95cfbda030 =htc migrate BodyPartRenderer to GraphStage #20288 2016-06-10 08:21:53 +02:00
Piotr Krzemiński
9ffdf81507 +htc #20683 discardEntityBytes() combinator for draining entity stream (#20707) 2016-06-10 00:00:27 +02:00
Kam Kasravi
049b95077f fixes #20414 Allow different ActorMaterializer subtypes 2016-06-07 07:13:03 -07:00
Patrik Nordwall
c1f36d8a43 Merge pull request #20594 from akka/wip-20531-patriknw
gating should not overwrite quarantine, #20531
2016-06-02 17:41:12 +02:00
Patrik Nordwall
48212778a5 keep the refuseUid along association state transitions, #20531
* keep the refuseUid (old quarantined) when transitioning
  Pass -> Gated -> Pass
* introduced new state WasGated to keep track of the refuseUid
2016-06-02 13:17:31 +02:00
Konrad Malawski
b9ce2c94f6 =htc #20214 disabling SNI per-connection now works (passing though sslconfig) (#20621) 2016-06-02 13:13:11 +02:00
Björn Antonsson
f46be728e8 Update MiMa to check against Akka 2.4.6 as well (#20604) 2016-05-24 12:58:18 +02:00
zhxiaog
11584f12eb converts LengthFieldFramingStage to GraphStage 2016-05-24 11:17:43 +02:00
Richard Imaoka
db83775c6d =str Converts DelimiterFramingStage from PushPullStage to GraphStage (#20367) (#20367) 2016-05-24 11:10:44 +02:00
Alexander Golubev
03395d5739 =str #20229 groupBy should be a Graph stage (#20344) 2016-05-23 10:31:49 +02: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
Patrik Nordwall
62a19471b7 Merge pull request #20462 from huntc/client-observer
Observable cluster client and its receptionist
2016-05-13 07:59:39 +02:00
Christopher Hunt
ceb0678de2 Observe the cluster client and its receptionist
Allows the cluster client and its receptionist to be observable in terms of contact points becoming available and client heartbeats. Furthermore a query API for requesting the current state has been provided.
2016-05-12 18:45:56 +10: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
Nafer Sanabria
17b419ce79 =str rewrite StartTimed, StopTimed & TimedInterval as GraphStage 2016-05-11 05:33:25 -05:00
leonidb
68e479a050 +per #20257 Snapshots with PersistentFSM 2016-05-07 22:58:19 +03:00
Robert Budźko
8534adf603 Introduced backpressure timeout (#20131) stage. 2016-05-06 12:57:27 +02:00
Bernard Leach
2420b96bc6 =htc make HttpMessageParser use GraphStage #19225 (#20385) 2016-05-06 11:24:42 +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
Konrad Malawski
d24c1e0ede =sha #20315 make sharding snapshotting based on seqNr, not counter (#20319) 2016-05-05 16:21:24 +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
Martynas Mickevicius
540e17dfc6 Add latest versions to MiMa 2016-04-26 15:28:41 +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
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
David Knapp
d7fe98e1c4 #20123 Added recoverWithRetries which adds a parameter to limit the (#20137)
number of attempts. Existing recoverWith method behavior remains unchanged.
2016-04-20 15:24:12 +02:00
Konrad Malawski
6e1b32e6ea htp #20214 more docs on https context configuring 2016-04-09 02:30:28 +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
Evgeny Vanslov
f42ab58b05 Replaced PushStage based TakeWhile with GraphStage #19834 2016-04-01 11:34:30 +03:00
Tal Pressman
26c25c89ed +str #19390 Add 'monitor' flow combinator and stage 2016-04-01 08:06:37 +02:00
Alexander Golubev
bcd52fb90a =str #19834 Replave UTF8Encoder with GraphStage 2016-03-31 11:07:12 -04: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
Johan Andrén
cb91c60266 Merge pull request #19990 from agolubev/19834-replace-collect-with-GraphStage
19834 replace collect with graph stage
2016-03-29 18:46:52 +02:00
Evgeny Vanslov
45a2440970 Replaced PushStage based CheckContentLength with GraphStage #19834 2016-03-28 23:50:08 +03:00
Roland Kuhn
8a3cf8145b lift mapMaterializedValue to FlowOpsMat 2016-03-24 12:51:39 +01:00
Alexander Golubev
951afec88e =str 19834 Migrating PushStages to GraphStage
Collect, DropWhile, LimitWeighted
2016-03-22 10:44:27 -04:00
Samuel Tardieu
0b4acce4d7 =str Simplify cancellation of TickSource
Fix #20028
2016-03-21 19:10:17 +01:00
Konrad Malawski
22dead97c9 Merge pull request #20011 from ktoso/wip-deprecate-dangerous-static-fields-ktoso
+htc #19162 unholy fix for javadsl initialization issues
2016-03-21 17:58:50 +01:00
Konrad Malawski
e0bac41822 +htc #19162 add init workaround when scala inits first (and then java) 2016-03-21 17:20:04 +01:00
Konrad Malawski
30e43d05aa Merge pull request #19908 from trautonen/take-as-graphstage-trautonen
Replaced PushStage based Take with GraphStage #19834
2016-03-21 15:44:13 +01:00
Tapio Rautonen
1bcc1310d2 Replaced PushStage based Take with GraphStage #19834
Changes suggested by @viktorklang

Added take to binary compatibility exclude

Cleanup
2016-03-18 21:35:05 +02:00
qian miao
aa8742738c =per #19828 pop the internal stash when the writing was finished in the processing commands state 2016-03-18 12:27:02 +08:00