Commit graph

848 commits

Author SHA1 Message Date
Johan Andrén
f1c589639c Bugfix #21130 remote-address support broken in server optimizations 2016-08-09 14:00:52 +02:00
Schmitt Christian
b54616aa87 HttpMessage#header[Content-Type] should work #21127 2016-08-08 15:37:20 +02:00
Konrad Malawski
db880a3db0 +htp #18837 implemented JavaDSL for Source streaming 2016-08-02 15:27:21 +02:00
Konrad Malawski
bb701d1725 HTTP: Optimise response rendering and response parsing (#21046)
* +htp,ben HttpBlueprint benchmark

* +act bring OptionVal from artery-dev
+htc raw benchmarks

* =htc request parsing benchmark

* +htc,ben add benchmark for longer (raw) json response

* =htc optimise renderHeaders, less Option allocs

* -htc remove FastClock, not quite worth it
2016-07-28 22:32:40 +02:00
Johan Andrén
9372087464 =htc #21051 WebsocketResponse future now fails if the connection failed (#21054)
* WebsocketResponse future now fails if the connection failed #21051
2016-07-28 17:48:06 +02:00
Ian Clegg
f33f2197b6 =htc #20786 Fix for RFC 7235 so HttpChallenge only renders the realm when it has a value (#21043) 2016-07-28 13:32:50 +02:00
Johan Andrén
c0861cb7d5 =htc #21008, controller stage misbehaving on early response (#21033)
* Bugfix #21008, controller stage misbehaving on early response

* Test coverage and only fix the actual bug
2016-07-27 17:48:48 +02:00
Konrad Malawski
5479276b64 =htc migrate Masker to graph stage (#21048) 2016-07-27 12:38:51 +02:00
Konrad Malawski
5d8dcc8ebc =htc #20921 mima filters and scaladoc for discardBytes (#21042) 2016-07-26 13:44:05 +02:00
Nafer Sanabria
da79af329f =htc #20921 add discardBytes method to HttpEntity (#20925)
add DiscardedEntity interface inside HttpEntity
2016-07-26 13:42:56 +02:00
Richard S. Imaoka
15c77e3392 Document HTTP custom method (#20508) 2016-07-26 12:33:45 +02:00
Johan Andrén
150511a44b =htc Byte string parser input for request target parsing (#21018)
* Avoid byte array allocation in request target parsing

* Request parsing benchmark added

* Missing copyright added
2016-07-26 12:00:24 +02:00
Hawstein
cf46ab887f +htc #20771 provide different options to deal with the illegal response header value (#20976) 2016-07-24 17:56:39 +02:00
Johan Andrén
6efec50c94 Limitable in HTTP Core rewritten as GraphStage #21019 2016-07-22 16:02:44 +02:00
Johan Andrén
9dc474a10a Pre-fuse http server layer (#20990)
* Ported the first pre-fuse part endre did in pr #1972

* Allow the same HttpServerBluePrint to materialize multiple times

HttpRequestParser now behave like a proper GraphStage (with regards to materialization)
HttpResponseParser is kept "weird" to limit scope of commit.

* TestClient method to dump with http client and curl in parallel for comparison

* Cleanup

* tightening down what can be overriden
* tightening down access modifiers
* updates according to review

* Better defaults for the test server

* Ups. Don't listen to public interfaces in test server by default.
2016-07-22 14:07:41 +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
Lev Khomich
8f19dfcece =htc do not mention source in HttpEntity.toString (#20739) (#20971) 2016-07-18 11:14:06 +02:00
Nafer Sanabria
8047f3359f =htc #20920 create ContentLength HTTP header in JavaDSL (#20926)
remove constructor
2016-07-18 10:55:09 +02:00
Nikolay Donets
b7567a5c55 Nikdon 20535 check same origin (#20962)
* =htp checkSameOrigin shows allowed origins

add HttpOriginRangeDefault into the javadsl and refactor

resolving binary compatibility + add copyright

return back public static final in the HttpOriginRange

* =htp #20535 address bin compat issues in checkSameOrigin PR
2016-07-15 13:39:40 +02:00
Konrad Malawski
f0a1ba8467 =htc replace getSimpleName with Logging.simpleName (#20951)
As getSimpleName sometimes has issues on some scala classes (blows up).
2016-07-15 10:52:40 +02:00
Konrad Malawski
65fae200b7 =htp #20884 fix header name rendering issue when $minus present (#20940) 2016-07-13 14:53:56 +02:00
Konrad Malawski
60fb163331 +doc #20192 explain need of draining entities in server/client HTTP (#20852)
* +doc #20192 explain need of draining entities in server/client HTTP

* missing javadsl for Connection header

* Update HttpClientExampleDocTest.java
2016-07-08 14:47:29 +02:00
Daniel Moran
6d2d4d5d25 =htc Convert HandlerStage to GraphStage, #19361. (#20855) 2016-07-08 13:44:54 +02:00
Konrad Malawski
54ecf32d2b =htp #20915 fix too small timing issue in DirectivesSpec (#20916)
* =htp #20915 fix too small timing issue in DirectivesSpec

* applying scalariform reformatting that keeps popping up
2016-07-08 10:33:32 +02:00
poojadshende
2769b5e1cb =htc Convert ChunkTransformer to GraphStage (#20493)
* Convert ChunkTransformer to GraphStage

* Updated onUpstreamFinish of ChunkTransformer class

* Convert chunkTransformer to graph stage

* Convert ChunkTransformer to GraphStage

* Convert ChunkTranformer to GraphStage
2016-07-07 23:26:52 +02:00
Ben Barnard
de18e3fe09 +htc Parse URIs with many query string segments (#20770)
This commit keeps the stack-heavy, reversal approach as long as there is
enough space on the parser's value stack, switching to a constant-stack
approach that requires a reversal for the rest of the query string when
the value stack starts getting full. This removes the hidden restriction
on query string complexity (which is now only subject to the URL length
restriction) without unduly penalising URLs with simpler query strings.

The new constructor method, rather than simply a new constructor
parameter with a default value, is to maintain binary compatibility.
Given that UrlParser is private[http], I'm not sure if this is really
necessary.
2016-07-07 23:24:30 +02:00
Konrad Malawski
64d74254c8 Explain SettingsCompanion being internal (#20893) 2016-07-06 11:49:29 +02:00
Felix Satyaputra
334959edd1 Modify SettingsCompanion to support create using ActorSystem (#20845)
- Remove final modifier from create(system: ActorSystem) within SettingsCompanion
- Implement create(system: ActorSystem) within each of the SettingsCompanion subclass
- Add tests to ensure compilation
2016-07-06 00:52:46 +02:00
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