Commit graph

820 commits

Author SHA1 Message Date
Andrea Peruffo
a230f2fe34 =str switch to java std lib ThreadLocalRandom. (#20877) 2016-07-05 14:59:48 +02:00
gosubpl
06aaa273f1 doc #20466 akka http java dsl examples - file upload directives (#20859)
* #20466 file upload - first example test done

* #20466 second test from FileUploadDirectivesExample passing in Java

* #20466 FileUploadDirectives examples file rename plus docs

*  #20466 post-review changes - adding better JAVA Multipart API

* #20466 Multipart Java conversions fix and added spec for the Java side of the model
2016-07-05 10:26:27 +02:00
monkey-mas
dce174b455 !htp #20102 Fix authentication scheme of WWW-Authentication header for OAuth2 over HTTP (#20756) 2016-06-30 10:28:40 +02:00
Konrad Malawski
d4d9c1943e =htc #20789 fix double push of requestPrepOut in HTTP blueprint (#20841)
* =htc #20789 fix double push of requestPrepOut in HTTP blueprint

* =htc simplify fix, can pull eagerly but under this condition

* =htc make early response a single line
2016-06-30 00:11:44 +02:00
Patrik Nordwall
f791cf123b stop PoolInterfaceActor on shutdown, #20842 (#20844) 2016-06-28 13:47:23 +02:00
Daniel Moran
e00a86271a =htc #19361 Convert UpgradeStage to GraphStage (#20835) 2016-06-28 11:58:12 +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
Kevin Deng
e8b4ca2acd =htc Ensure DNS resolution is performed for all new connections #20690 (#20791)
Pass in an unresolved InetSocketAddress to ensure that each new
TcpOutgoingConnection will perform DNS resolution.

This prevents a connection pool from always using the same IP address for a host
even if the DNS mapping changes (e.g. in a failover).
2016-06-25 11:31:35 +02:00
Patryk Jażdżewski
7259fcc534 +htc #20272 HttpMessageParser swallows IllegalHeaderException (#20783)
Catch clause in HttpMessageParser.parseBytes will intercept IllegalHeaderException being thrown and translate them into proper errors.
2016-06-21 16:30:25 +02:00
Hawstein
cc22ed4560 +doc example snippet for akka http java dsl: SecurityDirectives (#20717) 2016-06-19 02:06:19 +02:00
Konrad Malawski
374a852553 =htc #20683 added more docs, documented expected double-run behaviour (#20765) 2016-06-13 14:11:09 +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
Björn Antonsson
c66ce62d63 Update to a working version of Scalariform 2016-06-02 22:12:36 +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
2beaucoup
02904212bd replace thin spaces with regular spaces (to make diagrams look good) (#20696) 2016-06-02 11:38:34 +02:00
Jan Ypma
0a9283b8da htp #20685 HttpEntity should not care about the materialized type of its Source (#20684) 2016-06-01 16:56:48 +02:00
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