Commit Graph

755 Commits

Author SHA1 Message Date
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
Simone Bordet f30c02fa45 Issue #2037 - HTTP/2 stream reset leaves stream frames in the flusher.
Simplified stream staleness checks.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2017-12-11 11:50:18 +01:00
Simone Bordet d88e2b767f Fixes #2037 - HTTP/2 stream reset leaves stream frames in the flusher.
Now waking up the flusher via iterate() after a reset has been received.
This ensures that frames that may have stalled are removed from the
flusher queue.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2017-12-11 10:57:13 +01:00
Simone Bordet 6b7f906f9d Fixes #2034 - Improve HTTP2Session dump.
Now the session also dumps the flusher and all the streams.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2017-12-07 22:40:57 +01:00
Simone Bordet 22308e3c1d Fixes #2035 - FlowControlStrategy keeps around reset streams.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2017-12-07 22:40:57 +01:00
Simone Bordet 158f90bc9e Fixes #2033 - Improve HTTP/2 session and stream stall times report.
Now including both the past and the current stall times.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2017-12-07 19:21:47 +01:00
Joakim Erdfelt ff53002fac Updating to version 9.4.9-SNAPSHOT 2017-11-21 13:11:31 -07:00
Joakim Erdfelt 82b8fb23f7 Updating to version 9.4.8.v20171121 2017-11-21 12:33:52 -07:00
Jesse McConnell a72eb0001d Updating to version 9.3.23-SNAPSHOT 2017-10-30 15:39:57 -05:00
Jesse McConnell 705048cc49 Updating to version 9.3.22.v20171030 2017-10-30 15:16:29 -05:00
Simone Bordet 4236f14955 Fixes #1891 - Make HTTP/2 async error notifications configurable.
Introduced HttpConfiguration.notifyRemoteAsyncErrors, true by default.
2017-10-12 12:13:02 +02:00
Greg Wilkins 35d0b59434 Issue #215 Conscrypt module for SSL and ALPN
Upgraded to RC11
2017-09-26 10:09:30 +10:00
Greg Wilkins 5edb2b6f4f Issue#215 fixed tests dependencies 2017-09-21 09:35:18 +10:00
Greg Wilkins 687561e1c9 Issue#215 fixed tests dependencies 2017-09-21 09:02:24 +10:00
Greg Wilkins 817dabe873 Issue#215 fixed tests dependencies 2017-09-21 08:07:56 +10:00
Joakim Erdfelt d9865a02ba Updating to version 9.4.8-SNAPSHOT 2017-09-14 08:44:27 -07:00
Joakim Erdfelt 80fb788d0c Updating to version 9.4.7.v20170914 2017-09-14 07:35:18 -07:00
Simone Bordet 006dee439f Code cleanups.
Added TODOs to remember the link between the HTTP2Connection
fill callback and HTTP2ConnectionFactory.reservedThreads.
2017-09-08 10:52:40 +02:00
Simone Bordet 7e764bad3e Merged branch 'jetty-9.3.x' into 'jetty-9.4.x'. 2017-08-22 19:33:46 +02:00
Simone Bordet f9ff9e1226 Issue #1759 - HTTP/2 producer can block in onReset.
Because now the failures are asynchronous, code that was executed after
invoking the failure listener must be now executed after the
asynchronous processing done by the listener and therefore Callbacks
are introduced.
2017-08-22 15:54:40 +02:00