Commit Graph

2490 Commits

Author SHA1 Message Date
Joakim Erdfelt 8ed8dc62e3 Updating to version 10.0.2-SNAPSHOT 2021-02-19 13:06:42 -06:00
Joakim Erdfelt d0bfd9145d Updating to version 10.0.1 2021-02-19 12:43:50 -06:00
Joakim Erdfelt e81c847998
Happy New Year 2021 (Jetty 10 edition)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-01-21 15:05:57 -06:00
Simone Bordet e1f62c4905 Issue #5799 - Allow specifying the duration an object can stay in a pool.
Fixed AbstractConnectionPool.accept() to wrap the entry into an EntryHolder.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-01-14 20:09:15 +01:00
Ludovic Orban 058a488c30 Merge remote-tracking branch origin/jetty-9.4.x into jetty-10.0.x
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-01-12 16:22:11 +01:00
Ludovic Orban 0dec883fda implement connection pool max duration 2021-01-12 15:41:56 +01:00
Simone Bordet 847e8c612f Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-01-12 11:30:00 +01:00
Simone Bordet 6e1cd862e4
Fixes #5845 - Use UTF-8 encoding for client basic auth if requested. (#5847)
* Fixes #5845 - Use UTF-8 encoding for client basic auth if requested.

* Introduced get/setCharset in BasicAuthenticator on server-side.
* Looking for the "charset" parameter on the client-side, and if there, use it.
* Added test case.
* Code cleanups.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-01-12 11:26:33 +01:00
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 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 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 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
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 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
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 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
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
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 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
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 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 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
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 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 b997410845 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-09-10 13:26:15 +02:00