Commit Graph

2641 Commits

Author SHA1 Message Date
Simone Bordet b997410845 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-09-10 13:26:15 +02:00
Simone Bordet f81bf7f945
Fixes #3766 - Introduce HTTP/2 API to batch frames. (#5222)
* Fixes #3766 - Introduce HTTP/2 API to batch frames.

Introduced Stream.FrameList to hold HEADERS+DATA+HEADERS frames.
These are often used by the client and by the server when the
request/response content is known and FrameList will allow to
send them in a single TCP write, rather than multiple ones.

Rewritten HttpSenderOverHTTP2.sendHeaders() and
HttpTransportOverHTTP2.sendHeaders() to take advantage of
FrameList.

Now using ConcurrentHashMap as a client context, because
with DEBUG logging enabled it may be access concurrently.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-09-10 10:13:14 +02:00
Simone Bordet 1fa2b091a2 Merge branch 'jetty-9.4.x' into 'jetty-10.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-09-09 15:39:36 +02:00
Simone Bordet 01135e1515
Fixes #5217 - Review RoundRobinConnectionPool (#5219)
* Fixes #5217 - Review RoundRobinConnectionPool

Introduced IndexedConnectionPool and RandomConnectionPool.
Clarified semantic of RoundRobinConnectionPool.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-09-09 15:31:28 +02:00
Lachlan Roberts abb5ae8812 HttpExchange could be null during parse()
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-01 10:03:18 +10:00
Lachlan Roberts ae62180416 Issue #5170 - ensure bytes after 101 response isn't lost during upgrade
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-31 18:29:28 +10:00
Simone Bordet 7abb9d3929 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-26 08:50:12 +02:00
Simone Bordet 7cf605839b
Merge pull request #5166 from eclipse/jetty-9.4.x-5152-handle_unsolicited_response
Fixes #5152 - HttpClient should handle unsolicited responses.
2020-08-26 08:41:14 +02:00
Simone Bordet 30303c7979 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-25 16:15:33 +02:00
Jan Bartel 77779ed6d8
Issue #4996 - Regularlize logging (#5167)
* Issue #4996 Regularize logging

Signed-off-by: Jan Bartel <janb@webtide.com>

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-08-24 17:15:13 +02:00
Simone Bordet 0af5f676cd Issue #5147 - HTTP2 RoundRobinConnectionPool with maxUsage
Reworked HTTP/2 release after an exchange is terminated.

Previously, the release was bound to 2 events: onStreamClosed(),
introduced for #2796, and exchangeTerminated().
Unfortunately, if the former happens before the latter and
closes the connection, the latter will see the exchange as
aborted, while in fact it was successful, causing what
reported in #5147, an AsynchronousCloseException.

Now, the release is always performed by the exchangeTerminated()
event. With respect to #2796, the stream is always already
closed by the time the exchangeTerminated() event fires (it
was not before).

Reworked the implementation of RoundRobinConnectionPool using
a lock and aggressively trying to open new connections.

A second fix is related to HttpDestination.release(Connection).
If the connection is closed for e.g. overuse, we need to trigger
the processing of queued requests via send(create: true).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-22 22:10:08 +02:00
Simone Bordet 823e713ee4 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-22 17:35:25 +02:00
Simone Bordet 2d3f0e0c10 Improved logging and toString() implementations,
small refactorings in code and tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-22 17:31:12 +02:00
Simone Bordet 158a57276e Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-18 12:22:44 +02:00
Simone Bordet c88aba6587 Fixes #5152 - HttpClient should handle unsolicited responses.
Now closing the connection if an unsolicited response is detected,
no matter what response status code, or whether it has a
Connection: close header, or whether it's just random bytes from
the server, and also no matter whether the client read -1.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-18 12:18:20 +02:00
Simone Bordet 0646e4d0b5 Fixes #5165 - Wrong messagesIn count for HttpClient.
Now incrementing inMessages only when the response is complete.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-18 11:41:18 +02:00
Simone Bordet 7bc52f924a Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-14 18:34:46 +02:00
Simone Bordet a6e1f9df8f
Merge pull request #5151 from olegmoz/5150-zero-connection-timeout
Issue #5150 - Infinite connection timeout support in ManagedSelector
2020-08-14 18:32:52 +02:00
Oleg Mozzhechkov 32fe19a5e0 #5150 - Code style fix and connect timeout docs update
Signed-off-by: Oleg Mozzhechkov <oleg.mozzhechkov@gmail.com>
2020-08-13 21:23:31 +03:00
Simone Bordet e5570639e3 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-13 19:40:34 +02:00
Simone Bordet edbc1930b9 Issue #4809 - Set a max number of requests per connection.
Added test case for idle connections not used for any request.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-13 19:39:27 +02:00
Simone Bordet ae713d65d9 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-12 16:17:06 +02:00
Simone Bordet 4a0af046b8 Closes #4809 - Set a max number of requests per connection.
Implemented as part of #4975.

Added a test case that proves that the connection is closed
when the max usage count is reached.

Improved logging.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-12 16:14:51 +02:00
gregw cd42fd1635 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: gregw <gregw@webtide.com>
2020-08-12 11:42:36 +02:00
Greg Wilkins 25e3f1c1e0
Pool class refinements (#5117)
* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Some updates to the new Pool class:

 + fixed a race with pending reservations
 + use a pending counter
 + Reservation API to simplify Entry API
 + removed public methods on Entry API

* Updates from review

* Updates from review
Tests for cache size and acquire with creator

* Method no longer required with Reservation

* update from the feedback on the feedback of the feedback from the review.

Moved enable to Entry, removed Reservation class and clarified usage in javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

fixed javadoc

* Issue #5095 XmlConfiguration locking  Use pool instead of static shared instance

updates from review
2020-08-12 11:27:25 +02:00
olivier lamy 2522857a5a make this public to avoid jpms issue...
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-08-12 14:45:55 +08:00
Simone Bordet 16cd552995 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-08-11 21:00:43 +02:00
Simone Bordet 2e73f80d34 Fixes #5079 - :authority header for IPv6 address not having square brackets.
Reverted code changes to HttpClient.normalizeHost().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-11 20:03:42 +02:00
Simone Bordet 897e766f24 Fixes #5079 - :authority header for IPv6 address not having square brackets.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-11 19:18:11 +02:00
olivier lamy c198d26e6b Updating to version 10.0.0-SNAPSHOT 2020-08-11 16:47:55 +08:00
olivier lamy 429b091578 Updating to version 10.0.0.beta1 2020-08-11 16:47:54 +08:00
Simone Bordet d53d9d8a1d Fixes #5079 - :authority header for IPv6 address not having square brackets.
On the client:
* Origin.Address.host is passed through HostPort.normalizeHost(),
so that if it is IPv6 is bracketed.
Now the ipv6 address passed to an `HttClient` request is bracketed.
* HttpRequest was de-bracketing the host, but now it does not anymore.

On the server:
* Request.getLocalAddr(), getLocalName(), getRemoteAddr(),
getRemoteHost(), getServerName(), when dealing with an IPv6 address,
return it bracketed.
The reason to return bracketed IPv6 also from *Addr() methods is that
if it is used with InetAddress/InetSocketAddress it still works, but
often it is interpreted as a URI host so brackets are necessary.
* DoSFilter was blindly bracketing - now it does not.

Added a number of test cases, and fixed those that expected
non-bracketed IPv6.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-07 15:53:19 +02:00
Simone Bordet 1f14dfa427 Code cleanups.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-08-06 11:23:48 +02:00
Simone Bordet c49035570e Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-convert_synchronized_to_autolock'. 2020-08-04 16:32:55 +02:00
Simone Bordet 55f51fa0b5 Fixed copyright headers.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-31 19:01:59 +02:00
Simone Bordet 2fe01626a5 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-31 17:47:37 +02:00
Ludovic Orban e9dad975e6 Re-implement HTTP connection pooling with a non-queuing algorithm
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-07-31 10:36:43 +02:00
Simone Bordet 089e51f0bc Fixes #5083 - Convert synchronized usages to AutoLock.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-29 15:34:01 +02:00
Simone Bordet 8d69fc41a7 Fixes #5083 - Convert synchronized usages to AutoLock.
* Replaced relevant usages of synchronized with AutoLock.
* Made AutoLock serializable since classes that use it may be stored in the HttpSession.
* Added convenience methods to AutoLock to execute lambdas with the lock held.
* Introduced AutoLock.WithCondition to use a Lock and a Condition together.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-27 23:14:05 +02:00
Simone Bordet a33b0e290e Avoid using a protected Logger instance.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-27 16:05:03 +02:00
Joakim Erdfelt fe9deae849 Updating to version 9.4.32-SNAPSHOT 2020-07-23 13:53:47 -05:00
Joakim Erdfelt 450ba27947 Updating to version 9.4.31.v20200723 2020-07-23 12:46:54 -05:00
gregw 965e73e9e9 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-07-20 12:01:53 +02:00
gregw 88ec429b9c Issue #5053
removed weak random from digest.
2020-07-17 13:02:46 +02:00
gregw f6d39849e8 Improves #5053 by giving option of secure or pseudo random
Allow random to be passed in and can default to a weak pseudo random.
2020-07-17 12:19:22 +02:00
Greg Wilkins beca81c990
Fixes #5053 CWE-331 (#5056)
Replace uses of Random with SecureRandom.
We do not believe any of these uses of Random represent any security vulnerability, but we are making this
change for an abundance of caution and to avoid warnings from 3rd party scanning tools.
2020-07-16 15:31:19 +02:00
Lachlan Roberts c09e4d6f86 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-16 08:46:29 +10:00
Lachlan Roberts de1b6745c5 the DO NOT EDIT comment in .mod files should start with '#'
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-07-15 16:47:22 +10:00
Simone Bordet 7b05567b52 Issue #4808 - Review HttpClient Request header APIs.
For some reason, Request.getHeaders() returned HttpFields,
but HttpRequest.getHeaders() returned HttpFields.Mutable,
and it was obviously wrong.

Fixed WebSocket code that was relying on this API error.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-13 16:44:07 +02:00
olivier lamy eefe3d202b revert fail release
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-07-10 15:04:22 +10:00
olivier lamy 9619a5a743 Updating to version 10.0.0.beta1 2020-07-10 14:23:28 +10:00
Simone Bordet 113595254b Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-09 16:19:24 +02:00
Simone Bordet 94956d6e8b Issue #4904 - WebsocketClient creates more connections than needed.
Fixed MaxConcurrentStreamsTest - it was always broken.
The problem was that the call to super.onSettings(...) was done
_after_ sending the request, so the connection pool was still
configured with the default maxMultiplex=1024.

Also fixed AbstractConnectionPool to avoid a second call to
activate() if we are not trying to create a new connection.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-09 16:18:15 +02:00
Simone Bordet d31bbb2195 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-09 13:30:15 +02:00
Simone Bordet 6844c9362d Issue #4904 - WebsocketClient creates more connections than needed.
Fixed MultiplexConnectionPool.acquire() to use the new boolean
parameter to decide whether or not create a new connection.

This fixes ConnectionPoolTest instability.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-09 13:27:44 +02:00
olivier lamy aaeffb719e Updating to version 10.0.0-SNAPSHOT 2020-07-09 12:25:34 +10:00
olivier lamy 23c99ffdbe Updating to version 10.0.0.beta1 2020-07-09 11:20:55 +10:00
Simone Bordet 42d5db3208 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-07-03 10:46:24 +02:00
Simone Bordet e0955192b8
Jetty 9.4.x 4976 httpclient fix null network buffer (#5010)
Fixes #4976  HttpClient async content throws NPE in DEBUG log.

Reworked handling of asynchronous content by immediately exiting
HttpReceiverOverHTTP.process(), so that there is no race with
other threads that have been scheduled to resume the processing.

The call to HttpReceiver.dispose() that could be triggered by
an asynchronous failure is now performed either by the failing
thread (if the HttpReceiver is not processing) or by an I/O
thread (if the HttpReceiver is processing) similarly to what
happens when terminating the response.

The content decoding has been reworked to perform the required
state changes similarly to what non-decoded content is doing,
as this was completely lacking before (it was actually a side
bug that is now fixed).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2020-07-03 09:30:15 +02:00
Joakim Erdfelt 6df6fa33b8 Updating to version 9.4.31-SNAPSHOT 2020-06-11 08:24:34 -05:00
Joakim Erdfelt 271836e4c1 Updating to version 9.4.30.v20200611 2020-06-11 07:21:18 -05:00
Simone Bordet 5308adab60 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-06-01 22:02:59 +02:00
Simone Bordet 88a139628f
Merge pull request #4930 from eclipse/jetty-9.4.x-4929-request_cookies_not_sent_when_cookiestore_empty
Fixes #4929 - HttpClient: HttpCookieStore.Empty prevents sending cook…
2020-06-01 21:55:56 +02:00
Simone Bordet b8b88b238e Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-06-01 17:24:36 +02:00
Simone Bordet 4277759a85 Fixes #4904 - WebsocketClient creates more connections than needed.
After merge fixes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-06-01 17:19:31 +02:00
Simone Bordet 46c62d48d2 Fixes #4929 - HttpClient: HttpCookieStore.Empty prevents sending cookies.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-06-01 17:02:28 +02:00
Simone Bordet cf998fb321 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-06-01 16:34:33 +02:00
Simone Bordet 0ae2fff361
Fixes #4904 - WebsocketClient creates more connections than needed. (#4911)
* Fixes #4904 - WebsocketClient creates more connections than needed.

Fixed connection pool's `acquire()` methods to correctly take into account the number of queued requests.
Now the connection creation is conditional, triggered by
explicit send() or failures.
The connection creation is not triggered _after_ a send(),
where we aggressively send more queued requests - or
in release(), where we send queued request after a previous
one was completed.
Now the connection close/removal aggressively sends more
requests triggering the connection creation.

Also fixed a collateral bug in `BufferingResponseListener` - wrong calculation of the max content length.

Restored `ConnectionPoolTest` that was disabled in #2540, cleaned it up, and let it run for hours without failures.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-06-01 15:48:44 +02:00
Joakim Erdfelt 5d6f3e2ddc Updating to version 9.4.30-SNAPSHOT 2020-05-21 13:42:25 -05:00
Joakim Erdfelt 77c232aed8 Updating to version 9.4.29.v20200521 2020-05-21 12:04:14 -05:00
Simone Bordet 3af43c8ac3 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-05-21 18:36:36 +02:00
Simone Bordet b30c31e5c4
Merge pull request #4876 from eclipse/jetty-9.4.x-4836-ssl_client_rst_after_idle_timeout
Issue #4836 - Too Many Files Error with AWS ALB.
2020-05-20 23:07:01 +02:00
Simone Bordet cb61ec439a Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-05-14 14:58:29 +02:00
Simone Bordet 5cff403a69 Issue #4787 - Make org.eclipse.jetty.client.HttpRequest's host name writable.
Made the methods in the interface default so that potential implementers do not break.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-14 14:58:02 +02:00
Simone Bordet cac5ada734 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-05-14 13:39:00 +02:00
Ludovic Orban 1974b1b407 avoid creating URI instances when possible
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-05-13 17:38:43 +02:00
Ludovic Orban 7d80c8fc39 Add constructor to better align with 10.0.x
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-05-13 17:38:43 +02:00
Ludovic Orban e7aa3c2e23 explicitly size the listeners array lists
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-05-13 17:38:43 +02:00
Ludovic Orban 87be7b15eb replace regex match with simple string comparisons
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-05-13 15:14:50 +02:00
Simone Bordet 475c2c2f1e Issue #4836 - Too Many Files Error with AWS ALB.
Added test to replicate the traffic seen in the issue.
The test shows that we do close the server EndPoint.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-13 11:48:30 +02:00
Simone Bordet b6c6684c70 Fixes #4808 - Review HttpClient Request header APIs.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-08 17:52:27 +02:00
Simone Bordet a93b2c6084 Fixes #4808 - Review HttpClient Request header APIs.
Fixed test failures.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-05 14:48:36 +02:00
Simone Bordet cf9df70935 Fixes #4808 - Review HttpClient Request header APIs.
Introduced:
* Request Request.headers(Consumer<HttpFields.Mutable>).
This allows applications to modify the headers, and chain calls.
It also delegates the precise semantic of put/add/remove/clear to HttpFields, so there is no API duplication.
* HttpRequest.header(HttpField) to efficiently add fields while normalizing the request (only used in implementation).

* HttpResponse.header(HttpField) to efficiently add fields while parsing the response (only used in implementation).
This pairs with HttpResponse.trailer(HttpField).
* HttpResponse.headers(Consumer<HttpFields.Mutable>) to modify the fields after they have been populated (only used in tests).

Removed:
* Request.[set,add,put,remove], replaced by headers(Consumer<HttpFields.Mutable>).

Deprecated:
* Request.header(String, String)
* Request.header(HttpHeader, String)
Both replaced by headers(Consumer<HttpFields.Mutable>) with clearer semantic for add/put/remove.

All the rest is code cleanup to remove the usage of the deprecated header() methods.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-04 23:16:59 +02:00
Simone Bordet 1c22de433b Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-05-04 19:11:26 +02:00
Greg Wilkins 8c7e34f37d
Jetty 10.0.x immutable meta data (#4777)
Made HttpURI, HttpFields and MetaData immutable.  The first two follow the same builder pattern and MetaData is constructor injection only.

* Immutable version of HttpFields

Preserve API and usage of HttpFields class while providing a read only interface and immutable implementation.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable version of HttpFields

Use an ArrayList in HttpFields. While slightly slower than the array, it will mostly be used as a builder pattern for an Immutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable version of HttpFields

Fixed exception type.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable version of HttpFields

asImmutable method

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Made HttpURIU immutable with a builder pattern.
MetaData immutable and working within http module.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Fixes from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Passing tests upto and including jetty-server

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Cleanup of HttpURI.Builder API as suggested in PR.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

Added builder for MetaData.Request

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

more api fixes

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

WIP making HttpFiels itself immutable.  Currently working up to jetty-servlet.

Need to consider if content-length really is meta data and how much and when can we trust it.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

WIP

Need to consider if content-length really is meta data and how much and when can we trust it. Also need to consider difference between h2 and h1 authority in metadata.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

jetty-client and jetty-servlet passing tests.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Better align the style of immutability between `HttpFields` and `HttpURI`.
They both now have static build() and from() methods, plus Builder and Immutable implementations.
Potentially `Builder` could be renamed as `Mutable`

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

http2-server tests passed

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

http2-client tests passed

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

cleann build?

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

fix

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

more test fixes

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Cleanups, mostly using EMPTY when appropriate.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Cleanups, use immutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

No trailers for connect

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Fix CONNECT path handling

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

fixed rewrite query handling

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

rename Builders to Muttables

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

misc cleanups

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

Revert to using arrays due to garbage generated by streams and iterators (12% of a simple benchmark!).
Even if this garbage is an artifact of the JIT being disabled by observation, it can hide other allocations, so best to just use simple arrays!

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

More optimizations and better test coverage.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable Metadata

various cleanups

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

More optimizations

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

review changes

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + more usage of EMPTY
 + restored fragment handling

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable
 + less usage of asImmutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData WIP

changes after review:
 + less usage of Mutable

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

changes after review:
 + better handling of URI in ContextHandler

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

changes after review:
 + downcast in test to access mutable response headers.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Immutable MetaData

changes after review:
 + use put instead of add for one time headers

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* private

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-28 13:36:44 +02:00
Simone Bordet 8fec7b1530 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-04-27 23:30:55 +02:00
Simone Bordet 78e697d0a0 Fixes #4787 - Make org.eclipse.jetty.client.HttpRequest's host name writable.
For some historical reason, host and port were not mutable after the request
was created. Since many other key parameters are mutable (e.g. the scheme)
it makes sense to make host and port mutable too.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-18 21:52:27 +02:00
Joakim Erdfelt 5699b9ff3d Updating to version 9.4.29-SNAPSHOT 2020-04-08 13:15:04 -05:00
Joakim Erdfelt ab228fde9e Updating to version 9.4.28.v20200408 2020-04-08 12:33:56 -05:00
Simone Bordet e1be62c978 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-04-07 14:54:09 +02:00
Simone Bordet 4e3c0c8cd7 Fixes #4751 - Refresh NetworkTraffic* classes.
Introduced NetworkTrafficSocketChannelEndPoint to replace
NetworkTrafficSelectChannelEndPoint, now deprecated.

Code and javadocs cleanup.

Moved the tests to jetty-client so that also the client is tested.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-07 12:04:24 +02:00
Simone Bordet 51c42f2849 Improvements to the Jetty client documentation, protocols section.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-03 15:48:54 +02:00
Simone Bordet ec38e99630 Fixed handling of ClientConnector promises.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-04-01 10:06:35 +02:00
Simone Bordet 708115f609 Issue #4400 - Review HttpClient's ContentProvider.
Review updates.
* Updated AbstractRequestContent (and subclasses) failure handling.
* Updated MultiPartRequestContent failure handling.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-03-27 15:33:21 +01:00
Simone Bordet 0f2ddc8c9f Issue #4400 - Review HttpClient's ContentProvider.
Review updates.
* Now AbstractRequestContent supports multiple subscriptions.
* Reviewed abort() path to fail the content and the subscription
  and notify FailureListener sequentially with other listeners.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-03-26 17:46:59 +01:00
Simone Bordet 9fec1f43e0 Issue #4400 - Review HttpClient's ContentProvider.
Improved javadocs and comment as per initial review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-03-24 16:42:53 +01:00
Simone Bordet e215d071c8 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-4400-review_httpclient_content'. 2020-03-23 16:24:04 +01:00
Simone Bordet 1326700772 Issue #4382 - Support HTTP/1 upgrade to HTTP/2 in HttpClient.
Added comments and fixed logging.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-03-19 23:10:03 +01:00
Simone Bordet 2940eb8ab5 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-4382-h1_to_h2_upgrade'. 2020-03-18 11:44:06 +01:00
Simone Bordet f8d9f82eff Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-4400-review_httpclient_content'. 2020-03-18 11:40:11 +01:00
Simone Bordet 2bc8f361a6 Issue #4382 - Support HTTP/1 upgrade to HTTP/2 in HttpClient.
Updated after first review.
Added more tests, fixed the upgrade over TLS case.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-03-17 18:49:57 +01:00
Joakim Erdfelt 57604d0955
Issue #4572 - Mechanical Change to use org.slf4j
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-16 15:48:25 -05:00
Joakim Erdfelt 8b7e64915f
Issue #4572 - Replace Jetty Logging with SLF4J
* Introducing jetty-slf4j-impl
* Make Jetty use org.slf4j
* Removed most of org.eclipse.jetty.util.log classes
* Left org.eclipse.jetty.util.log.Log and
       org.eclipse.jetty.util.log.Logger but as
  simple bridge classes that are deprecated
* Migrated code using org.eclipse.jetty.util.log.StacklessLogging
  to org.eclipse.jetty.logging.StacklessLogging found in
  the jetty-slf4j-impl
* Moved logging start modules from jetty-util to jetty-home
* Simplified logging start modules
* Updated code that was using StdErrLog directly
* Updating module-info.java for org.slf4j
* removing org.eclipse.jetty.util.log.class references
* jetty-start supports manually declared default provider
  + and we use it to default "logging" to the "logging-jetty" provider
* Cleaning up jetty-maven-plugin and IT testing for Logging
* Using old slf4j for it testing
* Updating compiler config to show Xlint:exports warnings
* Updating console-capture and logging-noop
* Adding slf4j bridge (capture) jetty modules
* Updates to jetty logging module locations
* Changing reference to slf4j dependent mod
* Process requested enabled modules in topological order
* Limiting inclusions in shaded jetty-start
  + Also adding note to jetty-util classes that are used by
    jetty-start
* Default logging level on baseline logging config is INFO (not DEBUG)
* Changing from system to server classes in logging
* Updating other modules to use new logging names

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-03-16 11:21:54 -05:00
Simone Bordet 466517a0e8 Issue #4382 - Support HTTP/1 upgrade to HTTP/2 in HttpClient.
* Moved implementation of UpgradeTo from HTTP2ServerConnection
  to HTTP2Connection, since now also the client connection
  can be upgraded to.
* Split HTTP2Session.newStream(), since now the client must
  be able to create the implicit stream 1 corresponding to
  the HTTP/1.1 upgrade request, so that the HTTP/2 response
  after the upgrade finds the stream.
* The HTTP/1.1 upgrade mechanism has been generalized.
  Before it was based on HttpConnectionUpgrader and a hook
  in HttpChannelOverHTTP.exchangeTerminating().
  Now it is based on UpgradeProtocolHandler that when sees
  a 101 response it will trigger the upgrade mechanism.
* Introduced ConnectionPool.accept(Connection) to transfer
  a connection from the HTTP/1.1 connection pool to the
  HTTP/2 connection pool after the upgrade.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-03-13 15:59:13 +01:00
Simone Bordet 1393c0e92b Issue #4400 - Review HttpClient's ContentProvider.
Introduced Request.Content with a reactive model to provide
request content.
Introduced RequestContentAdapter to wrap ContentProviders
into Request.Content.
Updated implementation to use the reactive model rather than
the old pull model.
Reimplemented all ContentProviders in terms of Request.Content.
Converted most of the tests from ContentProvider to Request.Content.
Updated proxy servlets and documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-28 14:40:48 +01:00
Joakim Erdfelt 8aabb52557 Updating to version 9.4.28-SNAPSHOT 2020-02-27 13:03:44 -06:00
Joakim Erdfelt a304fd9f35 Updating to version 9.4.27.v20200227 2020-02-27 12:21:57 -06:00
Simone Bordet b0975aaba0 Fixes #4540 - ProxyConnectionFactory should not ignore TLVs.
Generified the API to expose TLVs, so that they are all exposed,
not only the custom TLV types in the 0xE0-0xEF range.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-21 09:37:12 +01:00
Simone Bordet 0fc12b0681 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-02-20 11:23:49 +01:00
Greg Wilkins a855744aeb release buffer in client as well
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-20 10:25:57 +01:00
Lachlan Roberts 55748f12c2 Issue #4581 - remove unnecessary javadoc on Override methods
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-18 11:33:56 +11:00
Greg Wilkins f50c2654b9 Fixes #4541 Large Headers
Added a HEADER_OVERFLOW result as per review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-06 21:17:58 +01:00
Simone Bordet 4fbbaf8b8e Fixes #3953 - Client configuration for direct/heap ByteBuffers.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-05 09:49:44 +01:00
Joakim Erdfelt 56fc476d55 Updating to version 9.4.27-SNAPSHOT 2020-01-17 07:00:10 -06:00
Joakim Erdfelt 7b38981d25 Updating to version 9.4.26.v20200117 2020-01-17 06:21:47 -06:00
Simone Bordet 65d50258b7 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-01-17 09:02:14 +01:00
Simone Bordet 6d65799bad Fixes #4481 - Fix NeedWantClientAuthTest for OpenJDK 13.0.2/11.0.6.
Updated the keystores to PKCS12 and added the Basic Constraint CA:true
to the server certificate.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-16 15:20:34 +01:00
Joakim Erdfelt 01a5974f4b
Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	Jenkinsfile
#	examples/async-rest/async-rest-webapp/src/test/java/org/eclipse/jetty/example/asyncrest/DemoServer.java
#	jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/HttpTester.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/MultiPartParserTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/PathMapTest.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/matchers/HttpFieldsMatchersTest.java
#	jetty-maven-plugin/src/test/java/org/eclipse/jetty/maven/plugin/it/TestGetContent.java
#	jetty-server/src/test/java/org/eclipse/jetty/server/CookieCutterLenientTest.java
#	jetty-server/src/test/java/org/eclipse/jetty/server/CookieCutterTest.java
#	jetty-server/src/test/java/org/eclipse/jetty/server/PartialRFC2616Test.java
#	jetty-servlet/src/test/java/org/eclipse/jetty/servlet/ServletLifeCycleTest.java
#	jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipContentLengthTest.java
#	jetty-servlets/src/test/java/org/eclipse/jetty/server/handler/gzip/GzipDefaultNoRecompressTest.java
#	jetty-servlets/src/test/java/org/eclipse/jetty/servlets/MultipartFilterTest.java
#	jetty-unixsocket/src/test/java/org/eclipse/jetty/unixsocket/UnixSocketClient.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/B64CodeTest.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/resource/FileSystemResourceTest.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/ssl/X509Test.java
#	jetty-webapp/src/test/java/org/eclipse/jetty/webapp/ClasspathPatternTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/LargeMessageTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/ClientAnnotatedEndpointScannerGoodSignaturesTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/endpoints/ClientAnnotatedEndpointScannerInvalidSignaturesTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/metadata/EncoderMetadataSetTest.java
#	jetty-websocket/javax-websocket-client-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/utils/ReflectUtilsTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ConfiguratorTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/DelayedStartClientOnServerTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/RestartContextTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ServerAnnotatedEndpointScannerGoodSignaturesTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/ServerAnnotatedEndpointScannerInvalidSignaturesTest.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/SessionTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/ErrorCloseTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/ClientConnectTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/ClientSessionsTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/WebSocketClientTest.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/server/PartialListenerTest.java
#	jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/extensions/ExtensionConfigTest.java
#	jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/util/QuoteUtilQuoteTest.java
#	jetty-websocket/websocket-api/src/test/java/org/eclipse/jetty/websocket/api/util/QuoteUtilTest.java
#	jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/ConnectionManagerTest.java
#	jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/TomcatServerQuirksTest.java
#	jetty-websocket/websocket-client/src/test/java/org/eclipse/jetty/websocket/client/WebSocketClientInitTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/GeneratorTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ParserTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/TextPayloadParserTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase11.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase12.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase2.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase4.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/ab/TestABCase73.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/EventDriverTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/events/JettyAnnotatedScannerTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/ByteAccumulatorTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/DeflateFrameExtensionTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/extensions/compress/PerMessageDeflateExtensionTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/ConnectionStateTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/io/http/HttpResponseHeaderParserTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/MessageDebug.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/message/Utf8CharBufferTest.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/test/UnitGenerator.java
#	jetty-websocket/websocket-common/src/test/java/org/eclipse/jetty/websocket/common/util/Utf8PartialBuilderTest.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/RedirectWebSocketClientTest.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/SimpleServletServer.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase1.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase2.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase3.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase4.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase5.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6BadUTF.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase6GoodUTF.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7BadStatusCodes.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase7GoodStatusCodes.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/ab/TestABCase9.java
#	pom.xml
#	tests/test-continuation/src/test/java/org/eclipse/jetty/continuation/ContinuationsTest.java
#	tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/JdbcTestHelper.java
#	tests/test-webapps/test-jetty-webapp/src/test/java/org/eclipse/jetty/TestServer.java
#	tests/test-webapps/test-proxy-webapp/src/test/java/org/eclipse/jetty/TestTransparentProxyServer.java
2020-01-15 12:20:20 -06:00
Joakim Erdfelt 8c65309963
Addressing Checkstyle violations in src/test/java
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-01-14 12:33:34 -06:00
Simone Bordet 51b97d5170 Issue #4459 - Move multipart classes to jetty-server.
Removed Surefire Plugin configuration no longer needed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-14 12:23:26 +01:00
Joakim Erdfelt 1f8ad08281
Fixing Checkstyle violations
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-01-09 15:56:06 -06:00
Simone Bordet 5f82e17d2f Issue #3578 - Adopt EPL-2.0 for Jetty-10.
WIP: updated copyright headers for Java files.

TODO: doc files and META-INF files inside jars.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-09 20:10:19 +01:00
Simone Bordet a5c99207fc Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-01-07 17:02:40 +01:00
Simone Bordet 923ec38adf Merged branch 'jetty-9.3.x' into 'jetty-9.4.x'. 2020-01-07 16:51:25 +01:00
Simone Bordet e3c8546667 Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'. 2020-01-07 16:35:05 +01:00
Simone Bordet de890bb1b7 Happy New Year 2020.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-07 16:25:32 +01:00
Joakim Erdfelt f4e7e4c3db Merge branch 'release-9.4.25' into jetty-9.4.x 2020-01-03 12:49:27 -06:00
olivier lamy ff48fba585 happy new year
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-01-02 21:59:21 +01:00
olivier lamy e1371a1c13 happy new year
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-01-02 21:54:05 +01:00
Lachlan Roberts c98897315c Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-4225-jpms_transitivity 2019-12-27 19:27:59 +11:00
Joakim Erdfelt 8974176c4b Updating to version 9.4.26-SNAPSHOT 2019-12-20 11:30:41 -06:00
Joakim Erdfelt a9729c7e7f Updating to version 9.4.25.v20191220 2019-12-20 10:46:56 -06:00
Simone Bordet a41b877876 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-19 22:13:22 +01:00
Simone Bordet af7cb94528
Merge pull request #4428 from eclipse/jetty-9.4.x-4427-httpclient_retried_request_duplicates_cookies
Fixes #4427 - Retried request duplicates cookies.
2019-12-19 22:00:15 +01:00
Simone Bordet e3bb5a7515 Issue #4225 - Fix JPMS transitivity.
Reworked all module-info.java files to take into
account JPMS transitivity.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-19 18:17:35 +01:00
Simone Bordet 133dbdf7fe Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-19 12:02:24 +01:00
Simone Bordet e4f1106f09 Fixes #4421 - HttpClient support for PROXY protocol.
Fixed visibility of ProxyProtocolConnection.
Must be protected because it's the return type
of protected methods.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-19 10:11:54 +01:00
Simone Bordet fdc131db89 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-18 00:51:32 +01:00
Simone Bordet bea7f1a5cf Fixes #4421 - HttpClient support for PROXY protocol.
Improved support for Type-Length-Value (TLV) objects.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-17 23:26:28 +01:00
Simone Bordet 91239b01e3 Fixes #4427 - Retried request duplicates cookies.
Introduced HttpRequest.normalized() to test and set whether
the request has already been normalized.
Added test case and few cleanups.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-17 20:16:46 +01:00
Simone Bordet b1e2f80017 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-17 13:41:15 +01:00
Simone Bordet 129a51c7a2
Fixes #4421 - HttpClient support for PROXY protocol. (#4424)
* Fixes #4421 - HttpClient support for PROXY protocol.

Implemented support for the PROXY protocol in HttpClient.

Introduced Request.tag(Object) to tag requests that belong
to the same group (e.g. a client address) so that they can
generate a different destination.

The tag object may implement ClientConnectionFactory.Decorator
so that it can decorate the HttpDestination ClientConnectionFactory
and therefore work both with and without forward proxy configuration.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-17 10:36:16 +01:00
Simone Bordet 6f2ac512dc Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-16 18:04:11 +01:00
Simone Bordet fa973a2df8
Merge pull request #4380 from eclipse/jetty-9.4.x-4374-httpclient_content_listener
Fixes #4374 - Jetty client: Response.AsyncContentListener.onContent i…
2019-12-16 18:01:27 +01:00
Simone Bordet 2364b075d7 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-07 12:42:00 +01:00
Simone Bordet 364ded9f73
Merge pull request #4391 from eclipse/jetty-9.4.x-3512-httpclient_multipart_close
Fixes #3512 - File descriptor is not released after zip file uploaded…
2019-12-07 12:38:40 +01:00
Simone Bordet 433928a016 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-12-04 15:16:38 +01:00
Simone Bordet 2ef02da1bd Fixes #4366 - HTTP client uses SOCKS4 proxy hostname for SSL hostname verification.
Now setting correctly the host and port to the server destination
_after_ the SOCKS tunnel is established, similarly to what is done
for the HTTP CONNECT tunnel.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-03 21:40:55 +01:00
Simone Bordet 9628ea3bc1 Fixes #3512 - File descriptor is not released after zip file uploaded via jetty-client.
In case of multiple parts only the last iterator was closed.
Now, every part's iterator is closed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-12-03 11:36:53 +01:00
Simone Bordet 902603fc9e Fixes #4374 - Jetty client: Response.AsyncContentListener.onContent is not called.
Now the various content listeners inherit from each other, like
it should have been from the beginning.
This also allowed to remove code duplication due to the default
implementation of the methods in various places.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-29 12:05:30 +01:00
Simone Bordet 3b817821e7
Merge pull request #3740 from eclipse/jetty-10.0.x-3537-bootstrap_websocket_http2
Issue #3537 - Bootstrap websocket on HTTP/2
2019-11-28 15:47:26 +01:00
olivier lamy 80da9e22db Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-11-27 10:09:37 +10:00
olivier lamy dc1a3384b0 ooops typo
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-11-27 07:18:59 +10:00
olivier lamy c291df5463 we do not want dependencies definied as range even for test transitive dependencies
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-11-27 07:04:57 +10:00
Simone Bordet f14ab3fc39 Merge branch 'jetty-10.0.x' into 'jetty-10.0.x-3537-bootstrap_websocket_http2'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-22 09:43:01 +01:00
Joakim Erdfelt 0f7a3b2d91 Updating to version 9.4.25-SNAPSHOT 2019-11-20 16:08:38 -06:00
Joakim Erdfelt 363d5f2df3 Updating to version 9.4.24.v20191120 2019-11-20 15:25:01 -06:00
Joakim Erdfelt dc03431de2 Merge branch 'release-9.4.23' into jetty-9.4.x 2019-11-20 07:14:53 -06:00
Simone Bordet 04dc257641 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-19 10:50:31 +01:00
Simone Bordet e89e8ae16e Improved toString() for ConnectionPool implementations.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-19 10:43:09 +01:00
Joakim Erdfelt 453d41940b Updating to version 9.4.24-SNAPSHOT 2019-11-18 13:52:51 -06:00
Joakim Erdfelt abbccc65d6 Updating to version 9.4.23.v20191118 2019-11-18 13:09:44 -06:00
Simone Bordet 27e5755b34 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-18 10:33:16 +01:00
Simone Bordet bf2482a7ea Moved implementation from Adapter classes to default methods in
the interface to avoid binary compatibility problems in case the
interface is changed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-18 10:29:55 +01:00
Simone Bordet c6ec9fb4d2 Fixed handling of DATA frames arriving _before_ the upgrade.
Now CONNECT with :protocol requests will demand DATA frames only
after the upgrade.

Other requests will demand DATA frames during the handling of
the request HEADERS frame.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-16 19:56:00 +01:00
Simone Bordet 06ce13e226 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-3537-bootstrap_websocket_http2'. 2019-11-14 12:42:15 +01:00
Simone Bordet e7322a79b2 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-13 23:44:22 +01:00
Simone Bordet 1b686eaba4 Fixed test failures after merge.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-13 08:39:51 +01:00
Greg Wilkins 46a3368f3b
Issue #2578 - Listener behavior cleanup (Jetty 10.0.x) (#3966)
* Avoid creating listener list for rarely used requestAttributeListener

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #3964

Keep a list of EventListeners in the AbstractConnector to make it
more efficient to add and iterate over them.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2578 EventListener

Use addEventListener rather than bespoke listener methods.
Support getEventListenerBeans at Container level for fast lookup
improve javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2578 EventListener

fixed test
more javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2578 EventListener

fixed tests

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #3964

Don't use null for empty lists of listeners

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* fix merge

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2578 EventListener

Resolve differences between eventListeners added as beans and beans
added as EventListeners.   The behaviour should now be the same
regardless of how they listener is added and all listeners are now
beans.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2578 EventListener

Add only SelectorManager listeners to manager from connector

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2578 EventListener

Fixed javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2578 EventListener

removed old TODO

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2578 EventListener

connector cannot be null

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2578 EventListener

javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #3964

AbstractConnector keeps a specific list of HttpChannel.Listeners
to avoid Connection.Listeners and MBean listeners being added to
the HttpChannel listener list.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2578 EventListener

fixed merge

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* fixed javadoc

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #2578 EventListener

removed the ability to set/clear context listeners
Instead just remove non-durable ones.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #3964 Listeners

Simplified listener handling by avoiding null connector, previously
only needed for testing.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* fixed bad merge

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #3964 Listeners

Fixed test that assumed HttpChannel listeners were not cleared by a recycle

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #3964 Listeners

Separated out durable vs cyclic HttpChannel.Listeners, so as to
simplify handling.

Deprecated cyclic HttpChannel.Listeners, as I'm not sure the channel is
the right place for them.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* removed deprecated cyclic HttpChannel listeners

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* removed deprecated cyclic HttpChannel listeners - import

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4003 Cleanup quickstart

* Fixed tests that scan for "Started" on console

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-13 11:04:38 +11:00
Simone Bordet aa57463175 Fixes #4301 - Demand beforeContent is not forwarded.
Now correctly handling no demand before the content
in FCGI and HTTP2 transports.

Fixed HttpRequest to correctly forward onBeforeContent()
to wrapped listeners.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-12 23:33:21 +01:00
Simone Bordet e2ccf8a1bc Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-12 17:06:14 +01:00
Simone Bordet 4825832a53
Merge pull request #4286 from eclipse/jetty-9.4.x-4277-httpclient_async_gzip
Fixes #4277 - Reading streamed gzipped body never terminates.
2019-11-12 19:04:05 +03:00
Simone Bordet 5f9edb1361 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-12 16:41:33 +01:00
Simone Bordet b1d231b9e7 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-11-11 16:45:12 +01:00
Lachlan c336616c96
Issue #2709 - reduce default headerCacheSize to 1024 (#4292)
make headerCacheSize on HttpReceiverOverHTTP configurable

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-11-08 21:57:49 +11:00
Simone Bordet a83c297a11 Fixes #4277 - Reading streamed gzipped body never terminates.
Fixed handling of demand in case of gzipped response content.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-11-07 22:32:11 +01:00
Joakim Erdfelt 43d95cd984 Updating to version 9.3.29-SNAPSHOT 2019-11-05 13:02:10 -06:00
Joakim Erdfelt d7dd68d6e9 Updating to version 9.3.28.v20191105 2019-11-05 11:46:40 -06:00
Joakim Erdfelt b17439c731 Updating to version 9.2.30-SNAPSHOT 2019-11-05 11:23:21 -06:00
Joakim Erdfelt 36c95fdd43 Updating to version 9.2.29.v20191105 2019-11-05 10:43:15 -06:00
Greg Wilkins dd53a8d70f Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-05 09:17:29 +11:00
Greg Wilkins 869c3b51ce
Issue #4265 Remove doError (#4266)
* Issue #4265 Remove doError

The doError method and the ErrorDispatchHandler class were
hang overs from when we needed to dispatch into a context to get sendError called, which would then generate the error page.

Now sendError doesn't do any generation, rather it changes state that arranges either for a minimal error page to be generated or an ERROR dispatch to a real handler/servlet to generate the error page.

Thus the ErrorDispatchHandler and doError methods can now be removed.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4265 Remove doError

Moved the error page dispatching logic back to the ErrorHandler class to assist with backwards compatibility

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4265 Remove doError

Moved the error page dispatching logic back to the ErrorHandler class to assist with backwards compatibility

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4265 doError

Updates from review.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-05 08:45:46 +11:00
Joakim Erdfelt e137ee3cd7
Issue #4217 - SslConnection DecryptedEndpoint flush eternal busy loop
+ Cleanup from review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-10-30 14:03:16 -05:00
Joakim Erdfelt c58fd58e41
Testing Large TLS Records for Jetty 9.2.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-10-29 19:14:07 -05:00
Joakim Erdfelt e665c8f806
Issue #4217 - SslConnection DecryptedEndpoint flush eternal busy loop
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-10-24 16:26:43 -05:00
Joakim Erdfelt 1ed13b6b30 Updating to version 9.4.23-SNAPSHOT 2019-10-22 09:19:41 -05:00
Joakim Erdfelt b1e6b55512 Updating to version 9.4.22.v20191022 2019-10-22 08:20:50 -05:00
Simone Bordet c2cde806d1 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-21 21:37:30 +02:00
Simone Bordet 73eb82c20f Issue #4217 - SslConnection.DecryptedEndpoint.flush eternal busy loop.
Updates after review.
Added test case.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-19 20:06:10 +02:00
Simone Bordet 991cf20cce Issue #4217 - SslConnection.DecryptedEndpoint.flush eternal busy loop.
Releasing the decrypted input buffer so that it can be re-acquired
with an expanded capacity.
Looping around only if the buffer size has changed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-19 12:27:58 +02:00
Simone Bordet 2e633a4e86 Fixes #4217 - SslConnection.DecryptedEnpoint.flush eternal busy loop.
Releasing the encrypted output buffer so that it can be re-acquired
with an expanded capacity.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-17 19:41:52 +02:00
Simone Bordet 7c11c7f85f Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-16 23:34:08 +02:00
Simone Bordet 20e0453da8 Merged branch 'jetty-9.4.x' into 'jetty-9.4.x-4201-httpclient_throw_sslhandshakeexception'. 2019-10-16 18:51:15 +02:00
Simone Bordet 364288886e Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-16 18:40:08 +02:00
Simone Bordet 1e360244a5 Fixes #4209 - Unused TLS connection is not closed in Java 11.
Added workarounds for the Java 11 behavior.

In fill(), call closeInbound() if we filled -1 and the handshake
did not start yet. This avoids to send a ClientHello to the peer
even if we are closing.

In flush(), if the handshake status is NEED_UNWRAP but we are
closing, force a wrap().

Added test cases.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-16 13:10:40 +02:00
Simone Bordet 4769de8a2b Issue #4209 - Unused TLS connection is not closed in Java 11.
Code cleanup.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-16 13:02:24 +02:00
Simone Bordet 3ce87f717c Fixes #4201 - Throw SSLHandshakeException in case of TLS handshake failures.
Now rethrowing other exceptions as SSLHandshakeException
if they happen during the TLS handshake.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-15 16:44:30 +02:00
Simone Bordet 95ccdd448e Issue #4177 - Configure HTTP proxy with SslContextFactory.
Small signature fixes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-11 11:29:12 +02:00
Simone Bordet 2ebd1ff62d Fixes merge from branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-10 10:42:51 +02:00
Simone Bordet cf687457e7 Issue #4177 - Configure HTTP proxy with SslContextFactory.
Small fixes after merge.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-10 10:41:42 +02:00
Simone Bordet 6430177685 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-10 10:38:38 +02:00
Simone Bordet a73568df28 Fixes #4177 - Configure HTTP proxy with SslContextFactory.
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-10 10:00:17 +02:00
Simone Bordet c8175ec107 Fixes #4177 - Configure HTTP proxy with SslContextFactory.
It is now possible to pass a `SslContextFactory.Client` to HttpProxy
so that it is possible to use a keystore for the proxy communication
and another keystore for the server communication.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-09 17:37:00 +02:00
Simone Bordet 783f3b49b0 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-09 10:22:18 +02:00
Simone Bordet 742f564332 Fixes #4170 - Client-side alias selection based on SSLEngine.
Fixed setting of host/port in AbstractConnectorHttpClientTransport
and HttpProxy so that the creation of SSLEngine can use the proper
host/port pair, and can be subsequently used in TLS components.

Introduced SslContextFactory X509ExtendedKeyManagerWrapper and
X509ExtendedTrustManagerWrapper as utility classes used internally
and in tests.

The test case for this issue required 3 keystores, so other test
classes have been refactored to use the new keystores.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-08 18:32:23 +02:00
Simone Bordet c93dddec30 Fixes #2429 - Review HttpClient backpressure semantic.
Fixes after merge.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-08 12:18:14 +02:00
Simone Bordet e2a493d7b0 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-08 09:52:21 +02:00
Simone Bordet a4603c4237 Issue #2429 - Review HttpClient backpressure semantic.
Updated after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-08 00:52:11 +02:00
Joakim Erdfelt d7a189fa18 Updating to version 10.0.0-SNAPSHOT 2019-10-03 12:05:26 -05:00
Joakim Erdfelt fd6a2cb9f6 Updating to version 10.0.0.alpha1 2019-10-03 11:25:06 -05:00
Simone Bordet ef05f730e6 Issue #4115 - Drop HTTP/2 pseudo headers.
Added Javadocs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-03 16:58:16 +02:00
Simone Bordet 3be178c966 Merged 'jetty-9.4.x' into 'jetty-9.4.x-2429-httpclient_backpressure'. 2019-10-03 13:17:39 +02:00
Simone Bordet 9fbc41f1d5 Fixes #4150 - Module org.eclipse.jetty.alpn.client not found, required by org.eclipse.jetty.proxy
Made jetty-alpn-client required by jetty-client.
Fixed groupId for test-proxy-webapp.
Added test case for the failing configuration.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-10-02 23:11:02 +02:00
Joakim Erdfelt 6fc42d8ba2 Merge branch 'release-9.4.21' into jetty-9.4.x 2019-10-01 13:35:43 -05:00
Simone Bordet ea99b3ac69 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-10-01 17:37:30 +02:00
Simone Bordet 72d1a297a0
Merge pull request #4109 from mofleury/jetty-9.4.x
Support meaningful JMX ObjectNames for HttpDestinations by avoiding race condition at creation
2019-10-01 17:31:45 +02:00
Simone Bordet 1cb09db75a Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-09-30 09:01:57 +02:00
Marc-Olivier Fleury 8e51a4d532 adjusted formatting to follow standards
Signed-off-by: Marc-Olivier Fleury <mofleury@gmail.com>
2019-09-30 08:34:54 +02:00
Simone Bordet 2c75e876a3 Fixes #3787 - Jetty client throws EOFException instead of SSLHandshakeException on certificate errors.
Now exceptions thrown by fill() or flush() are stored in a field.
Further fill() operations will rethrow the original exception rather
than returning -1.

Returning -1 to application was causing them to close() with a generic
failure that was triggering the EOFException reported in this issue.

Now applications see the original exception and can close() with the
proper cause.

Re-enabled HostnameVerificationTest that was reproducing this issue
reliably but was @Disabled a while back and never re-enabled.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-26 18:30:43 +02:00
Simone Bordet d12df30df7 Issue #3787 - Jetty client throws EOFException instead of SSLHandshakeException on certificate errors.
Code cleanups.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-26 18:18:13 +02:00
Joakim Erdfelt 7807eafad9 Updating to version 9.4.22-SNAPSHOT 2019-09-26 10:46:28 -05:00
Joakim Erdfelt 72970db61a Updating to version 9.4.21.v20190926 2019-09-26 09:59:15 -05:00
Joakim Erdfelt 6ebc7840da
Merge pull request #4021 from eclipse/jetty-10.0.x-remove-deprecations
Removing @Deprecated methods / classes from jetty-9.4.x merge
2019-09-24 13:37:54 -05:00
Joakim Erdfelt cf993e579e Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-09-23 12:07:43 -05:00
Simone Bordet b3be28086b Fixes #4113 - HttpClient fails with JDK 13 and TLS 1.3.
1. Now forwarding the fillable event rather than assuming that is due
to garbage bytes or by a server close. This ensures that a HTTP read
consumes the TLS bytes and the `NewSessionTicket` message.
2. Avoid to set the `SslConnection` onto the `EndPoint` in
`SslClientConnectionFactory` - this allows upgrades to work properly,
for example when tunnelling through a secure proxy.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-23 17:59:37 +02:00
Marc-Olivier Fleury ebe28c27e4 using computeIfAbsent to avoid the duplicate registering of Destinations in the MBean Server
Signed-off-by: Marc-Olivier Fleury <mofleury@gmail.com>
2019-09-20 14:55:45 +02:00
Simone Bordet d39f19cc23 Issue #2429 - Review HttpClient backpressure semantic.
Introduced a Response.DemandedContentListener to explicitly separate
the will to request more content from the notification that the content
has been consumed.

Updated all transports to follow the new semantic: rather than waiting
for the callback to complete before delivering more content, now they
wait for the demand to be positive to deliver more content.

Since now the content may be unconsumed but there can be more demand,
all transport implementation had to be changed to use RetainableByteBuffer
to retain content buffers that were not consumed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-19 17:19:25 +02:00
Simone Bordet 9ee302be68 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-09-12 12:14:46 +02:00
Simone Bordet 8c1e0b0714 Fixes #4082 - Debug logging causes NullPointerException in client.
Using BufferUtil to guard against NPEs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-12 12:14:15 +02:00
Simone Bordet d69a1f0f58 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-3537-bootstrap_websocket_http2'. 2019-09-12 00:11:01 +02:00
Chris Walker f7a0156961
Merge 9.4.x 2019-09-05 13:20:19 -04:00
康智冬 3a6b26d292 fix typo (#4055)
Signed-off-by: KangZhiDong <worldkzd@gmail.com>
2019-09-05 13:17:30 -04:00
Chris Walker 189ba7a671
Merge from 9.4.x 2019-09-02 14:49:33 -04:00
康智冬 49ba6d1acb fix typo and grammar (#4045)
Signed-off-by: KangZhiDong <worldkzd@gmail.com>
2019-09-02 14:29:50 -04:00
Joakim Erdfelt 583e443c66 Removing @Deprecated methods / classes from jetty-9.4.x merge
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-23 15:53:14 -05:00
olivier lamy a36af67abf Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-08-22 20:45:57 +10:00
Olivier Lamy fe3d3f7158
fix checkstyle in test sources (#4013)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-22 19:56:41 +10:00
Simone Bordet 01af85db42 Issue #3537 - Bootstrapping WebSockets with HTTP/2.
Implemented upgrade logic for WebSocket over HTTP/2.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-08-14 14:57:21 +02:00
Joakim Erdfelt f1efc99918 Updating to version 9.4.21-SNAPSHOT 2019-08-13 17:34:20 -05:00
Joakim Erdfelt 84700530e6 Updating to version 9.4.20.v20190813 2019-08-13 16:13:21 -05:00
Simone Bordet a700907522
Issue #250 - Implement HTTP CONNECT for HTTP/2. (#3539)
Fixes #250 - Implement HTTP CONNECT for HTTP/2.

Modified HTTP/2 implementation to support the CONNECT method.
Implemented semantic defined by RFC 8441.
Implemented section 8.3 of RFC 7540.
Introduced HTTP2Client.streamIdleTimeout.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-08-13 19:07:04 +03:00
Jan Bartel b734c373e8 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-07-29 14:34:52 +10:00
Simone Bordet 8431686939 Issue #3883 - Client: support embedding threadlocal data (e.g. distributed tracing data) into the request.
Added test case that shows how to do it.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-07-26 14:51:53 +02:00
olivier lamy 6df9ef3a15 Updating to version 10.0.0-SNAPSHOT 2019-07-12 06:54:56 +10:00
olivier lamy 8cbfd51e80 Updating to version 10.0.0-alpha0 2019-07-12 06:54:56 +10:00
olivier lamy a34e641a27 Updating to version 10.0.0-SNAPSHOT 2019-07-11 17:20:27 +10:00
olivier lamy 2e58f2f515 Updating to version 10.0.0-alpha0 2019-07-11 14:19:45 +10:00
Greg Wilkins d744d097de
Checkstyle cleanup (#3847)
* Checkstyle cleanup
* fixed bug from reformat
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-07-03 17:24:08 +02:00
Greg Wilkins b7a7a53a18
Jetty 10.0.x reformat (#3812)
* Removing Legacy Method Separators
* Restyling branch `jetty-9.4.x`
* Applying changes highlighted by checkstyle
* Removing Legacy Method Separators
* Restyling branch `jetty-10.0.x`
* Applying checkstyle changes
* Applying checkstyle changes
* Applying XML restyling
* Restyling XML in branch `jetty-10.0.x`
* Fixing XML codestyle for IntelliJ
* Fixing XML style mistakes
* Fixing XML restyling in branch `jetty-10.0.x`
* Revert "Applying XML restyling"
* Updating checkstyle for XML codestyle
* Revert "Restyling XML in branch `jetty-10.0.x`"

# Conflicts:
#	jetty-xml/src/test/resources/org/eclipse/jetty/xml/configureWithAttr.xml
#	jetty-xml/src/test/resources/org/eclipse/jetty/xml/configureWithElements.xml

* Adding back build-resources
* Reformatting pom.xml files
* Disabling Checkstyle job
* fixed empty string on line wrap
* reformatted with latest intellij style
* misc checkstyle fixes

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-06-24 17:42:39 +02:00
Greg Wilkins 9706d70484
Jetty 9.4.x reformat (#3811)
* Removing Legacy Method Separators
* Restyling branch `jetty-9.4.x`
* Applying changes highlighted by checkstyle
* Applying XML restyling
* Fixing XML codestyle for IntelliJ
* Fixing XML style mistakes
* Revert "Applying XML restyling"
* Updating checkstyle for XML codestyle
* Reformatting pom.xml files
* Fixed empty string from line wraps
* Update intellij style to not do expression relative formatting. Reformatted code based on that.
* Increasing line split on Eclipse IDE Formatter to 512
* Restoring setting on internal default value.
+ IntelliJ will not export settings on things that set to their
  internal default values.
  We want to keep those values as a hedge against future default
  value changes in future releases of IntelliJ.
* Fixing intellij codestyle
* do not allow single line simple methods
* misc checkstyle fixes
* re-exported with correct name and all values

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-06-24 17:40:30 +02:00