Commit Graph

2699 Commits

Author SHA1 Message Date
Simone Bordet f836f87754 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-01-11 11:23:12 +01:00
Simone Bordet 403d5ec318
Fixes #5855 - HttpClient may not send queued requests. (#5856)
Changed the AbstractConnectionPool.acquire() logic to call tryCreate() even
when create=false.

This is necessary when e.g. a sender thread T2 with create=true steals a
connection whose creation was triggered by another sender thread T1.
In the old code, T2 did not trigger the creation of a connection, possibly
leaving a request queued.
In the new code, T2 would call tryCreate(), possibly triggering
the creation of a connection.

This change re-introduces the fact that when sending e.g. 20 requests
concurrently, 20+ connections may be created.

However, it is better to err on creating more than creating less and leaving
requests queued.

Further refactoring moved field pending from Pool to AbstractConnectionPool.
As a consequence, AbstractConnectionPool.tryCreate() now performs a 
demand/supply calculation to decide whether to create a new connection.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Greg Wilkins <gregw@webtide.com>
2021-01-07 16:05:24 +01:00
Simone Bordet 5a28c7484a Avoid that tests wait indefinitely.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-01-06 11:34:30 +01:00
Joakim Erdfelt d5b08ea9f2
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-12-11 11:40:10 -06:00
Joakim Erdfelt 2662be0a05
Merge pull request #5795 from eclipse/jetty-10.0.x-5784-fix-dual-license-text
Issue #5784 - fix dual license text
2020-12-11 11:37:58 -06:00
olivier lamy efe4f5e5ea Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-12-11 12:11:53 +10:00
olivier lamy 9b100a5bfb Merge branch 'jetty-9.4.x' into jetty-10.0.x 2020-12-11 12:10:35 +10:00
Olivier Lamy 639cad63fe
Jetty 9.4.x optimize parser warning from logs and add spotbug (#5735)
* enable spotbugs in CI

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

record issues

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

use warning new generation

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

activate errorprone

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

fix Jenkinsfile

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

do not run spotbugs for jetty-runner as we do not want to fix all dependencies bugs :)

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

junit should allow empty results

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

maven console can be use only once...

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

one liner

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

recordissues only once

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

force id

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

aggregate results

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

configure a name for aggregated reports

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

mo more -T3 no need anymore of remote session test profile

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

I want to see what failing tests look like with new report.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

skip spotbugs for jetty-jmh

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

get rid of findbugs as we now have spotbugs

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

Revert "I want to see what failing tests look like with new report."

This reverts commit df0d13e4c53d7461872e1f925ec06bd36e4a66c9.

activate errorProne parser

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

make pmd quiet for CI

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

remove -fae flag and do not display transfer progress

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

try junitParser() to see what it does

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

junit parser is a bad idea...

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

increase timeout

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

no -T2 for javadoc

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

fix skip spotbugs and pmd verbose

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* remove -T options

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-12-11 11:47:26 +10:00
Joakim Erdfelt f0badc5c5e
Issue #5784 - Fixing source header text: EPL-2.0 OR Apache-2.0
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-12-10 16:04:50 -06:00
Joakim Erdfelt 30bd8b9fba Updating to version 11.0.1-SNAPSHOT 2020-12-02 15:59:13 -06:00
Joakim Erdfelt 432f896d7a Updating to version 11.0.0 2020-12-02 15:35:56 -06:00
Joakim Erdfelt 9319f10425 Updating to version 10.0.1-SNAPSHOT 2020-12-02 15:30:13 -06:00
Joakim Erdfelt b9645a1737 Updating to version 10.0.0 2020-12-02 15:04:53 -06:00
olivier lamy 1207d1eee5 Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-11-28 11:47:59 +10:00
Simone Bordet 963ea59e75 Fixed NullPointerException during HTTP/1.1 -> HTTP/2 upgrades.
The upgrade could happen in the context of a HttpParser.parseNext()
call, which eventually upgrades the EndPoint, passing what remains in
the NetworkBuffer to the new Connection and releasing the NetworkBuffer.

The messageComplete() parser callback was still returning false even
if the response was 101, causing the HTTP/1.1 parser to continue, but
now the NetworkBuffer was null, producing the NullPointerException.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-27 13:50:09 +01:00
Simone Bordet a241b9dd5e Improved logging.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-27 13:43:09 +01:00
Joakim Erdfelt e8683cba9f Updating to version 9.4.36-SNAPSHOT 2020-11-20 16:05:27 -06:00
Joakim Erdfelt bdc54f03a5 Updating to version 9.4.35.v20201120 2020-11-20 15:05:50 -06:00
Simone Bordet 406dec79e3 Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'. 2020-11-16 16:45:16 +01:00
Simone Bordet 36d8289dee Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-11-16 16:39:53 +01:00
Simone Bordet a308881fab Fixes #5633 - Allow to configure HttpClient request authority.
Introduced HttpDestination.send(Request, Response.CompleteListener) to send a request using the given destination.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-11-11 17:13:00 +01:00
Simone Bordet 8b8154d044 Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'. 2020-11-03 19:12:27 +01:00
Ludovic Orban 814dc69803 Get rid of addContent() by making produceContent() return Content instead.
Make EOF and errors be special content.
Transition to a much simplified FSM by using the needContent() / produceContent() model.
Implement blocking on top of async, this way there is only one FSM.
(Milestone 6)

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-11-03 17:30:25 +01:00
Joakim Erdfelt edaadff55b Updating to version 9.4.35-SNAPSHOT 2020-11-02 09:04:51 -06:00
Joakim Erdfelt e46af88704 Updating to version 9.4.34.v20201102 2020-11-02 08:03:51 -06:00
olivier lamy 9ac7714895 Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-10-28 12:12:45 +10:00
olivier lamy 651f23ee25 Merge branch 'jetty-9.4.x' into jetty-10.0.x 2020-10-28 12:12:07 +10:00
Joakim Erdfelt b480a97b44
Issue #5519 - Disable problematic HttpClientTLSTest.testMismatchBetweenTLSProtocolAndTLSCiphersOnClient test
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-10-27 16:58:05 -05:00
Joakim Erdfelt af31eac07e
Disabling SslBytesClientTest due to JDK 8u272 differences. 2020-10-27 16:03:20 -05:00
olivier lamy fda530444c Revert "add surefire timeout for httpclient test"
This reverts commit 6845947bbf.
2020-10-27 11:55:35 +10:00
olivier lamy 6845947bbf add surefire timeout for httpclient test
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-10-27 08:39:32 +10:00
Joakim Erdfelt e726eefb0b Updating to version 9.4.34-SNAPSHOT 2020-10-20 18:55:39 -05:00
Joakim Erdfelt 1be6875565 Updating to version 9.4.33.v20201020 2020-10-20 18:28:51 -05:00
Lachlan Roberts 08cf431e88 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-10-16 15:21:25 +11:00
Simone Bordet 210ae6ef5f Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-10-14 16:02:22 +02:00
Simone Bordet c5df807b6d Fixes #5409 - HttpClient fails intermittently with "Invalid response state TRANSIENT".
The problem was a race condition during content decoding.
Since decoding needs to be done in a loop, the condition to loop is to
check whether there is demand for the next chunk of decoded content.

Checking for demand also sets the stalled flag, and this must be done
only after the response state has been set back to CONTENT.
Unfortunately this was not done in the decoding loop.

The fix is to always update the response state in the decoding loop.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-10-13 23:18:26 +02:00
Joakim Erdfelt b5a957f415
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-10-12 08:50:53 -05:00
Simone Bordet 1cd15e8d85
Fixes #5379 - Better handling for wrong SNI. (#5398)
* Fixes #5379 - Better handling for wrong SNI.

Reworked the SNI logic.
Added support for IP addresses in the SAN extension of certificates in the X509 class.
Fixed keystores to have CN=localhost and SAN with ip=127.0.0.1 and ip=[::1].
Fixed tests that were not using the correct Host header.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-10-12 15:48:53 +02:00
Joakim Erdfelt d3cb5d4b06
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-10-08 09:49:40 -05:00
Joakim Erdfelt 95aba606d8
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-10-08 09:49:16 -05:00
Joakim Erdfelt bc641dcd22
Merge pull request #5332 from eclipse/dependabot/maven/jetty-9.4.x/org.apache.kerby-kerb-simplekdc-2.0.1
Bump kerb-simplekdc from 1.1.1 to 2.0.1
2020-10-08 09:46:54 -05:00
Joakim Erdfelt c223ee37ab Updating to version 11.0.0-SNAPSHOT 2020-10-02 16:38:23 -05:00
Joakim Erdfelt 9ce21ec22b Updating to version 11.0.0.beta2 2020-10-02 16:20:55 -05:00
dependabot[bot] 7cca195801
Bump kerb-simplekdc from 1.1.1 to 2.0.1
Bumps kerb-simplekdc from 1.1.1 to 2.0.1.

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-30 18:51:32 +00:00
Joakim Erdfelt 85e257fc98 Updating to version 9.4.33-SNAPSHOT 2020-09-30 11:53:09 -05:00
Joakim Erdfelt de97d26f7b Updating to version 9.4.32.v20200930 2020-09-30 11:03:24 -05:00
Joakim Erdfelt 88f3dd5a52
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-09-29 11:37:46 -05:00
Joakim Erdfelt ad2446dd6c
Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-09-29 11:24:28 -05:00
Joakim Erdfelt 3423375a97
Issue #5357 - Updating to https://eclipse.org/ (#5358)
* Issue #5357 - Updating to https://eclipse.org/

 - Removing redundant <url> refs in pom.xml
 - Correcting bad indenting from merge
 - Correcting mailing list references
 - Correcting bugs.eclipse.org references
 - Correcting text file references
 - Correcting html references
 - Correcting further references
 - Correcting download.eclipse.org reference
 - Adding test for demo-base /proxy/current/
 - Ensuring jetty-client is included in javadoc-proxy.war/WEB-INF/lib

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-09-29 11:02:32 -05:00
Greg Wilkins b220fc711e fixed checkstyle from merge
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-09-23 19:27:47 +02:00
Greg Wilkins 0ac34ff2b8
Issue #5304 HTTP2 HostHeader (#5307)
* Issue #5304 HTTP2 HostHeader

Updated HostHeaderCustomizer to actually add the Host header, either from values passed in the custructor or from the getServerName and getServerPort methods.

The HttpURI is no longer updated.

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

* Issue #5304 HTTP2 HostHeader

 + Found and fixed bug in HttpFields
 + Added port normalization support to HttpScheme
 + added test

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

* blank line

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

* Issue #5304 HTTP2 HostHeader

 + refixed bug in HttpFields

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

* Issue #5304 HTTP2 HostHeader

 + still fixing HttpFields bug

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

* Issue #5304 HTTP2 Host Header

updates from review
2020-09-23 15:05:52 +02:00
Lachlan Roberts a3090a61e8 Issue #5170 - backport fix to websocket upgrade from jetty-10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-22 18:25:11 +10:00
Joakim Erdfelt 0016463089
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-09-17 02:43:53 -05:00
gregw b7a4c36286 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: gregw <gregw@webtide.com>
2020-09-16 18:31:51 +02:00
Greg Wilkins ba22c08fde
Alternative Pool Strategies (#5218)
* Speculative idea to make a pluggable Pool strategy

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

* Speculative idea to make a pluggable Pool strategy

 + javadoc

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

* Speculative idea to make a pluggable Pool strategy

 + Added a ThreadLocalStrategy for a single cached item
 + Tell strategies about newly reserved entries
 + Fixed multiplexing test that was dependent on the impl of the cache

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

* Speculative idea to make a pluggable Pool strategy

 + added tests

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

* Feedback from review

 + Don't have a fallback iteration, instead make a SearchStrategy and DualStrategy

* Feedback from review

 + split strategies into Cache and Strategies

* Feedback from review

 + Added reserve and release

* Improved Pool Strategies:

+ reverted to post notifications for removed, reserved and released.
+ Added a few more strategies that need to be benchmarked, that use the list iterator.

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

* Testing all the different strategies

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

* More simplifications and made LRU work (ish)

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

* javadoc

* More javadoc

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

* JMH Test

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

* one strategy

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

* test

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

* Split implementations:

 + pluggable strategies
 + hard coded

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

* More benchmarks

* Built in strategy

* removed strategies version and simplified to single configurable solution.

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

* updates from review

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

* better javadoc

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

* Updated ConnectionPool classes to use Pool strategies

* Small javadocs fixes.

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

* Updates from review

* javadoc

Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2020-09-16 18:27:26 +02:00
Lachlan Roberts 315161d2df Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-09-16 16:40:26 +10:00
Lachlan 76cf6c8bdc
Merge pull request #5266 from eclipse/jetty-10.0.x-WebSocketAutoBahn
Issue #5170 - fix upgrade bug in HttpReceiverOverHTTP
2020-09-16 16:39:54 +10:00
Lachlan Roberts c9cd27ee4d Issue #5170 - fix upgrade bug in HttpReceiverOverHTTP
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-09-14 15:09:00 +10:00
Simone Bordet b5f9a42b01 Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'. 2020-09-10 13:34:21 +02:00
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 ee122aa661 Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'. 2020-09-09 15:42:33 +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 4bd92cd6c3 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-09-02 18:01:12 +10: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 06a2ebc48e Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'. 2020-08-27 00:02:55 +02: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 e47d2fb32b Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-08-24 17:20:56 +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
olivier lamy 06a538784d Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-08-24 11:03:13 +10: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
Lachlan Roberts a87e88576d Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-08-19 09:25:21 +10: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
olivier lamy 85a281f473 Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-08-15 09:25:23 +08: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
olivier lamy 2d0b90f164 Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-08-13 17:03:45 +08: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 ab34bdd86a Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-08-12 11:45:37 +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 a1946e8512 Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-08-12 14:46:24 +08: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
olivier lamy 26b2433b3f Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-08-12 09:50:32 +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 e26126264a Updating to version 11.0.0-SNAPSHOT 2020-08-11 16:48:06 +08:00
olivier lamy 6b2b429ba5 Updating to version 11.0.0.beta1 2020-08-11 16:48:06 +08: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 e8f76878e3 Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'. 2020-08-04 17:46:55 +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
Lachlan Roberts 730b42619b Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-08-04 20:39:32 +10:00
Simone Bordet 55f51fa0b5 Fixed copyright headers.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-07-31 19:01:59 +02:00
Joakim Erdfelt e1427ea2ee
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x
# Conflicts:
#	jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandler.java
2020-07-31 11:04:45 -05: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
Lachlan Roberts 761e114890 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-07-28 13:36:42 +10: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
Jan Bartel 1b2b721ce3 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-07-21 16:00:20 +02: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 640e1eea54 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-07-16 08:48:45 +10: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
Jan Bartel 0b57809c04 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-07-14 14:19:50 +02: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
olivier lamy 6ff39cf848 Updating to version 11.0.0-SNAPSHOT 2020-07-10 06:25:08 +10:00
olivier lamy 4c250b0f93 Updating to version 11.0.0.beta1 2020-07-10 06:25:07 +10:00
Simone Bordet 80f1afb0fd Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'. 2020-07-09 16:19:41 +02: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 a5a2ae6f45 Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'. 2020-07-09 13:32:47 +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 9fa6a5794c Updating to version 11.0.0-SNAPSHOT 2020-07-09 16:24:52 +10:00
olivier lamy 5353ec98e0 Updating to version 11.0.0.beta0 2020-07-09 14:32:48 +10: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
olivier lamy f036fe649e Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-07-03 21:00:09 +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
Lachlan Roberts 3b53c785ea Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-06-03 12:39:33 +10: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
Joakim Erdfelt 2e9caba325
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-06-01 09:43:34 -05: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
olivier lamy fc77b3e199 Updating to version 10.0.0-SNAPSHOT 2020-05-30 19:41:49 +10:00
olivier lamy dddc4a58e4 Updating to version 11.0.0-alpha0 2020-05-30 13:27:25 +10:00
Lachlan Roberts 5d876d46db Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-05-26 10:44:16 +10:00
Lachlan Roberts 94f79f8f26 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-05-26 09:44:25 +10: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
olivier lamy 45690ad09b Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-05-16 20:31:01 +10: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
olivier lamy 7e37eb1a6b Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-05-11 13:49:39 +10: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
Lachlan Roberts 44abef5c58 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-05-08 11:13:04 +10:00
olivier lamy e677d7c6f0 Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-05-07 11:06:39 +10: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 728c8f9471 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-28 13:43:32 +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
Greg Wilkins e678092514 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-04-28 10:56:17 +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
Jan Bartel b15cfeda91 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x 2020-04-16 15:20:43 +02:00
olivier lamy 7e03bb250e Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-04-10 18:46:25 +10: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
olivier lamy 28335133a1 fix merge
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-04-07 14:43:52 +10:00
olivier lamy 3483e0c2f7 Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-04-07 11:39:31 +10: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
olivier lamy 22061399e5 Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-04-02 12:33:13 +10: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
olivier lamy efd090d31e Merge branch 'jetty-10.0.x' into jetty-11.0.x 2020-03-31 15:00:48 +10:00
Lachlan Roberts 5309b4b225 Issue #4568 - update to use jakarta.servlet 5.0.0
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-03-31 14:54:59 +10: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