Commit Graph

774 Commits

Author SHA1 Message Date
Joakim Erdfelt 1732ffca51 Updating to version 9.4.11-SNAPSHOT 2018-05-03 11:48:05 -05:00
Joakim Erdfelt daa59876e6 Updating to version 9.4.10.v20180503 2018-05-03 10:55:19 -05:00
Simone Bordet c4e1e8f454 Moved method onFlushed() to ISession.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-04-25 15:11:24 +02:00
Simone Bordet d7dac7ea1d Issue #2474 - HTTP/2 client not handling invalid servers correctly.
Fixed by start reading from the server after the session
promise has been notified, which may send the first request.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-04-23 20:04:25 +02:00
Simone Bordet fa5a1d3be4 Fixes #2453 - RawHTTP2ProxyTest.testRawHTTP2Proxy failure on CI.
onData() implementations must copy the data
bytes if they do not consume them locally.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-04-20 18:15:53 +02:00
Simone Bordet 50c44f2297 Fixes #2454 - Avoid sending empty DATA frame in case of HTTP/2 trailers.
Updated the logic to avoid sending an empty data frame
when only sending the trailers in HttpTransportOverHTTP2.send().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-04-18 14:19:58 +02:00
Jan Bartel 0e88849a68
Issue #2164 Make osgi.serviceloader mostly optional (#2408)
Signed-off-by: Jan Bartel <janb@webtide.com>
2018-04-18 14:48:53 +10:00
Simone Bordet 6224e75862
Issue #2366 - Review HTTP/2 interleaving. (#2379)
* Fixes #2366 - Review HTTP/2 interleaving.

Now using a fairer algorithm that performs multiple generation passes
but without generating all frames for the current entries - it stops
after N passes over all the entries when the number of bytes to
write is large enough.

Using HttpConfiguration.outputBufferSize as the writeThreshold on
the server and a default 32 KiB on the client to stop the generation
after a pass over all the entries.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-04-13 11:50:17 +02:00
Simone Bordet c14f7efc95 Fixes spurious failures of FlowControlStrategyTest.testServerFlowControlOneBigWrite().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-04-10 19:01:15 +02:00
Simone Bordet 06454f6409 Fixes #2420 - Simplify HttpTransportOverHTTP2.
Removed usage of ternary expressions in favor of if/else statements
to improve readability of the logic for the send() method.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-04-07 12:25:39 +02:00
Jan Bartel 16e625adde
Issue #2109 remove warnings for unused imports and exports (#2390)
Signed-off-by: Jan Bartel <janb@webtide.com>
2018-04-04 12:06:43 +10:00
Simone Bordet 072442a5e5 Fixes #2225 - Test failure: StreamResetTest.testBlockingWriteAfterStreamReceivingReset.
The problem was caused by the reset arriving to the server
_before_ the commit callback was invoked.
Now waiting for the commit callback to complete before
sending the reset to the server.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-29 12:31:44 +02:00
Simone Bordet 8cf15659be Issue #2349 - Review HTTP/2 max streams enforcement. (#2389)
* Issue #2349 - Review HTTP/2 max streams enforcement.

Changed the max concurrent remote streams enforcement algorithm.
It is now based on the stream count and the closing stream count,
updated atomically in a state machine in HTTP2Stream.

Fixed Javadoc.

Fixed close() method.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-28 13:10:11 +11:00
Joakim Erdfelt a74a328024 Merge branch 'release-9.4.9' into jetty-9.4.x 2018-03-21 16:33:56 -05:00
Simone Bordet 8251ed5a12
Fixes #2311 - TimeoutException when server sends unexpected content. (#2324)
Now exiting the parse loop when the response is complete; if there
are bytes remaining in the buffer, then it's cleared out.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-21 16:25:18 +01:00
Joakim Erdfelt c3cc138a3b Updating to version 9.4.10-SNAPSHOT 2018-03-20 08:25:59 -05:00
Joakim Erdfelt 1f8159b1e4 Updating to version 9.4.9.v20180320 2018-03-20 07:18:24 -05:00
WalkerWatch 534b8ea38b Add edit warning for .mod files. Resolves #173 2018-03-15 13:23:42 -04:00
Simone Bordet b00bb2adb2 Reverted logging level back to INFO.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-15 16:07:51 +01:00
Simone Bordet 8b391a88dd Fixes #2318 - HttpParser.Listener.onBadMessage() should take BadMessageException.
Changed the signature of HttpParser.Listener.onBadMessage()
to take a BadMessageException and updated dependent code.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-12 19:51:57 +01:00
Simone Bordet ff341fb420 Issue #2313 - Dump HTTP/2 channel state.
Added HTTP/2 stream age to toString().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-12 11:30:00 +01:00
Simone Bordet 21bdb367fd Fixes #2313 - Dump HTTP/2 channel state.
Dumping also HttpChannelOverHTTP2 when dumping the HTTP2Stream.
The channel is now stored as a field in HTTP2Stream rather than
as an attribute to save the attributes map allocation.
Consequently, IStream has now getter/setter for the property
"attachment" that is used to store the channel without having
a type dependency on HttpChannel.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-10 15:11:40 +01:00
Simone Bordet 4c24c457de Fixes #2312 - HTTP/2 Connection.Listener notified after first request.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-10 15:05:02 +01:00
Simone Bordet b71cd70bf7 Fixes #2297 - HTTP/2 client transport should honor HttpClient.connectBlocking.
Introduced property connectBlocking in HTTP2Client so that it can
be forwarded by HttpClient and then used for HTTP/2 connects.

Also introduced HTTP2Client.bindAddress, again forwarded from HttpClient.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-07 11:52:28 +01:00
Greg Wilkins 74055b9837
Jetty 9.4.x 2293 pending multiplexed (#2294)
Issue #2293 Pending Multiplexed Connections

Added a AtomicBiInteger to allow both total connections and pending connections to be encoded in the
same atomic int.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-07 19:31:22 +11:00
Greg Wilkins bcb9fa3b32
Merge pull request #2257 from lachlan-roberts/jetty-9.4.x-2206-ReferenceEquality
Resolved errorprone ReferenceEquality warnings #2206
2018-03-07 11:11:40 +11:00
Simone Bordet 5dea9b673e Fixes #2291 - Expose HTTP/2 close reason in dumps.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-03-07 00:45:23 +01:00
Greg Wilkins 1713a49551 improved timing on http2 reset stream test
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-03-06 15:43:07 +11:00
Lachlan Roberts 020ebde77c found additional ReferenceEquality warnings which have been resolved
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-06 14:28:11 +11:00
Lachlan Roberts a639ee9275 Resolved errorprone MissingOverride warnings #2206
`@Override` was added to methods which were missing the annotation #2206

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2018-03-01 13:59:25 +11:00
Greg Wilkins 0cb4f5629d
Jetty 9.4.x 1803 proposal 0+2 (#2199)
Merging this PR for #2199 as we currently think it is not worse than previous and the code base is definitely simpler.   While JMH has shown significant benefits for this approach, we have yet been able to demonstrate them in full scale integration tests - however that is likely due to GC and thread pool issues dominating.

A `org.eclipse.jetty.http2.PEC_MODE` System property has been added to allow the EWYK scheduling to be disabled for HTTP/2 if need be.


* Implementation of #1803 proposal 2 - EITHER dispatch type for EWYK
* made code more readable
* increase small threadpools in tests for extra reserved thread
* clean up
* minor code simplifications
* Work in progress to simplify reserved thread pool
* use a single ReservedThreadPool built into the QueuedThreadPool
* fixed javadoc
* removed more old reserved thread references
* disable EWYK for h2
* fixes from review
* use EWYK for HTTP2
* Fixed javadocs, imports and QueuedThreadPool constructors.
* fix javadoc
* EWYK avoid unnecessary pendings
* after review
* fixed merge with jetty-threadpool.xml
* alternate EWYK implementations
* added jetty copyright headers
* Simplified EWYK code after review
* fixed bad merge
* Code cleanups.
* Improved Javadocs for deprecated property "reservedThreads".
* Improved Javadocs for deprecated property "reservedThreads".
* added a system property to enable only PEC for HTTP/2

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-02-27 14:29:59 +11:00
Simone Bordet f8c45b1c6c Simplified toString().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-02-22 15:25:32 +01:00
Simone Bordet c7c85a9a01 Removed unused test class.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-02-22 15:25:32 +01:00
Greg Wilkins ec51926622 reduce fragility of tests
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2018-02-19 19:22:32 +11:00
Simone Bordet 8a6b33a3e8 Fixes #2190 - HTTP/2 close and GOAWAY behavior.
Now the receiver of a GOAWAY also replies with a GOAWAY
before closing the connection.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-02-09 10:55:39 +01:00
Greg Wilkins ab5fc29cca Jetty 9.4.x 1803 proposal 0 - single ReservedThreadExecutor (#2119)
Issue #1803 - Review usage of scheduling strategies

Use a single ReservedThreadExecutor built into the QueuedThreadPool
via new interface TryExecutor.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-02-08 11:08:48 +01:00
Simone Bordet 56a2a00812 Overridden toString() for FailureTask to print the failure.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-02-07 15:40:30 +01:00
Greg Wilkins 7138dc3828
Jetty 9.4.x #1918 scalable scheduler3 (#2101)
* Scalable scheduler changes for #1918
* Added HttpChannel.destroy to destroy CyclicTimer
* fixed rebase with HttpConnectionOverFCGI
* renamed to acquire
* Destroying the HttpChannel consistently in all transports.
* updated headers
* cleanup after final review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-10 16:56:41 +01:00
Joakim Erdfelt 21365234f8 Issue #2108 - Updating license headers for year 2018 2018-01-09 09:44:41 -06:00
Joakim Erdfelt 41ed9f29f4 Merge remote-tracking branch 'origin/jetty-9.3.x' into jetty-9.4.x 2018-01-09 09:37:25 -06:00
Joakim Erdfelt fa4c7b0ca9 Issue #2108 - Updating license headers for year 2018 2018-01-09 08:39:37 -06:00
Greg Wilkins 88cf4603c5
Merge branch 'jetty-9.4.x' into bugfix/javadoc_fixes_2056 2018-01-08 21:31:48 +01:00
olivier lamy 1a49a6fb7e more javadoc fixes #2056
Signed-off-by: olivier lamy <olamy@webtide.com>
2018-01-08 12:28:12 +11:00
olivier lamy f07ea2bbf3 more javadoc fixes #2056
Signed-off-by: olivier lamy <olamy@webtide.com>
2018-01-06 20:26:22 +11:00
Simone Bordet c35b832251 Fixes #2088 - Recycle HTTP/2 channels on the client.
Recycled channels also for FCGI.
Small improvements to HTTP/2 too.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-05 17:19:06 +01:00
Simone Bordet 48c77b8608
Fixes #2088 - Recycle HTTP/2 channels on the client. (#2089)
Removed the distinction between pushed and non-pushed channels; only
non-pushed channels are released and recycled if they're not failed.

Properly resetting HttpReceiverOverHTTP2.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-04 07:09:08 -08:00
Greg Wilkins 41050cd8a4
Issue #2081 No idle timeout exception when dispatch is delayed (#2083)
Issue #2081 No idle timeout exception when dispatch is delayed
* Delegate the readtimeout handling to HttpChannel so that a delayed dispatch can be ended.
* Added unit test for delayed dispatch idle
* Now using HttpInput.onIdleTimeout() to fail the HttpInput, and then dispatching the request in case it has not been dispatched yet. This ensure consistent behavior independently of the value of HttpConfiguration.delayDispatchUntilContent.
* Fixed for both HTTP/1.1 and HTTP/2.
* Added tests for non-blocking reads.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-04 13:26:31 +01:00
Simone Bordet 1cad36969f Made test more robust.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2018-01-03 10:46:02 +01:00
Simone Bordet e86e8a752c Issue #1973 - Implement minimum response data rate (#2012)
* Code cleanups.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* Improved test case handler.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* Improved exception message.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* Issue #1973 - Implement minimum response data rate.

Implemented response content data rate control in HttpOutput.

Introduced a WriteFlusher.Listener interface that produces events
for every flush(). These events are forwarded to the Connection
and from there to the HttpOutput so that the data rate control can
be enforced.

Both HTTP/1.1 and HTTP/2 are implemented.
Data rate control for HTTP/1.1 is approximate because it will count
also headers bytes and the chunk bytes, while for HTTP/2 is precise.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* Issue #1973 - Implement minimum response data rate.

Addressed review comments.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2017-12-27 15:07:32 +01:00
Simone Bordet d3db89d7e3 Fixes #2019 - Expose HttpClientTransport in JMX.
Added missing @ManagedObject annotation to AbstractConnectorHttpClientTransport.

Also exported to JMX the "multiplexed" attribute for the FCGI transport
and the "useALPN" attribute for the HTTP/2 transport.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2017-12-14 12:28:46 +01:00