Commit Graph

2625 Commits

Author SHA1 Message Date
Joakim Erdfelt c50aa2f61b
Updating to version 10.0.19-SNAPSHOT 2023-10-26 21:10:08 -05:00
Joakim Erdfelt 8545fd9bf4
Updating to version 10.0.18 2023-10-26 20:59:27 -05:00
Simone Bordet fa166d09c5
Fixes #10786 - TLS handshake failures leak HttpConnection.RequestTimeouts tasks
Moved the call to destroy the CyclicTimeouts to a close() call that is always called.

Fixed NPE in ManagedSelector.getTotalKeys().

Fixed exception handling to avoid infinite recursion in SslConnection.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-26 16:49:52 +02:00
Joakim Erdfelt 722b97ad6a
Updating to version 10.0.18-SNAPSHOT 2023-10-09 13:32:28 -05:00
Joakim Erdfelt af15f12297
Updating to version 10.0.17 2023-10-09 13:21:53 -05:00
Joakim Erdfelt 896dee2466
Updating to version 10.0.17-SNAPSHOT 2023-08-25 14:27:38 -05:00
Joakim Erdfelt a2735a9ae9
Updating to version 10.0.16 2023-08-25 14:10:55 -05:00
Simone Bordet 36faf1d369
Removed break statement wrongly introduced by #10326.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-21 10:45:02 +02:00
Simone Bordet e91a68923a
Fixes #8926 - HttpClient GZIPContentDecoder should remove Content-Len… (#10326)
Now Content-Length and Content-Encoding are removed/modified by the decoder.
In this way, applications have a correct sets of headers to decide whether to decode the content themselves.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-21 08:58:22 +02:00
Simone Bordet 4bfdd51f94
Removed unused code.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-31 19:20:13 +02:00
Simone Bordet b2477d1c38
Fixes #10160 - Verify PROXY_AUTHENTICATION is sent to forward proxies (#10162)
Now TunnelRequest.getURI() does not return null, so normalizeRequest() can properly apply the authentication headers.

Moved copy of a request to HttpRequest, so also the sub-type can be copied.
Fixed restore of destination in HttpProxy.HttpProxyClientConnectionFactory.newProxyConnection(): now doing it in the promise rather than in finally block.
Using the proxy destination (not the server's) to send subsequent CONNECT requests in case the first is not replied with 200.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-31 18:39:13 +02:00
Simone Bordet 218c8d0fb0
Fixes #10086 - Revisiting ProxyConfiguration.getProxies() (#10116)
Removed "for removal" deprecation, added clarifying javadocs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-17 16:45:17 +02:00
Simone Bordet c967b100e7
Fixes #10105 - Document that Request objects are not reusable. (#10113)
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-17 16:44:44 +02:00
Joakim Erdfelt a9c596e3d7
Updating various old/moved URL references found across project (`jetty-10.0.x`) (#10098)
* Now that the migration of `https://eclipse.org/jetty/` to `https://eclipse.dev/jetty/` has occurred, it is time to review the URI use in our project

+ Updated URLs in poms
+ Added more URIs to XmlConfiguration
+ Updated URLs in module files
+ Updated URLs in documentation
+ Updated URLs in HTML
+ Correcting bad double-scheme URLs (eg: `http://https://www.eclipse...`)
+ Updating text in *.mod files
+ Removing `/current/` from path `/jetty/documentation/current/`
+ Fixing mailing list URL

---------

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-07-14 12:38:45 -05:00
Ludovic Orban e4f4828a0e #9524 do not create AsynchronousCloseException unnecessarily
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-31 11:39:32 +02:00
Simone Bordet 420ec7cc1d
HTTP/2 improvements. (#9749)
* Implemented a few required error handlings.
* Changed `Parser.init()` to directly take the listener, rather than wrapping it.
  The reason for this change was to be able to reconfigure the Parser upon receiving a SETTINGS frame.
* Initially setting the encoder and decoder max table capacity at the default of 4096, as per spec.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-27 19:14:01 +02:00
Ludovic Orban e30b23aca6 #9397 fix keystores with invalid Subject Alternate Names
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-05-26 23:09:24 +02:00
Simone Bordet d4e9f6a520
Fixes #7091 - Add SOCKS5 support.
Spin-off of the work in #9653.
Simplified the implementation, fixed a few mistakes, added more tests.
Made the implementation of Socks5.Authentication more extensible (for example to implement GSSAPI authentication).
Updated documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-03 19:40:55 +02:00
huisongma 28cd6d8ada
Initial implementation for #7091 - SOCKS5 support. 2023-05-03 19:40:55 +02:00
Joakim Erdfelt ca3c1756ad
Updating to version 10.0.16-SNAPSHOT 2023-04-11 13:23:25 -05:00
Joakim Erdfelt 68017dbd00
Updating to version 10.0.15 2023-04-11 12:24:32 -05:00
Simone Bordet fe505766fd
Fixes #9501 - jetty client with proxy Connection: close (#9508)
Now Connection: close is ignored for 2xx responses to a CONNECT method.
In this way the tunnel is kept open, and bad proxies that were sending
Connection: close are now supported as apparently they are still out there.

Fixes also #6483.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-03-20 10:09:58 +01:00
Joakim Erdfelt 10a374aeb5
Disable test no longer functional on OpenJDK 11.0.18+
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-03-01 13:50:10 -06:00
Olivier Lamy e62cc0344a Updating to version 10.0.15-SNAPSHOT 2023-03-01 18:55:10 +10:00
gregw 7a7d69a69f Happy no year
Remove modification date from copyright notice and instead just have the
project inception year.

Signed-off-by: gregw <gregw@webtide.com>
2023-02-15 15:22:32 +11:00
dependabot[bot] ca19b143a9
Bump maven.surefire.plugin.version from 3.0.0-M5 to 3.0.0-M8 (#9255) 2023-02-02 04:15:39 +00:00
Joakim Erdfelt 54c4c03244
Updating to version 10.0.14-SNAPSHOT 2022-12-07 14:33:17 -06:00
Joakim Erdfelt 1c2636ea05
Updating to version 10.0.13 2022-12-07 14:12:50 -06:00
Simone Bordet f122e75dd6
Reduced test load and increased timeout to avoid flakyness in Jenkins.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-12-06 14:29:51 +01:00
Simone Bordet 1a1b9cfe4c
Fixes #8770 - Review whether to send request body in redirects. (#8775)
* Fixes #8770 - Review whether to send request body in redirects.

Now the original request body is re-sent only if the redirect status code is 307 or 308.
In the other cases, it is a redirect to a GET method, so the Location is followed without resending the body, and the content headers are removed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-11-08 21:54:20 +01:00
Simone Bordet 35af8e5c71
Fixed tests that fail when localhost resolves to more than one address.
On Windows, Mac, OpenSolaris (verified) and probably Docker (did not verify, but likely),
DNS resolution of "localhost" yields [127.0.0.1, ::1], while on Linux only [127.0.0.1].

HttpClient will try the first address, and in case of failure will try the second address.
For those tests that want to explicitly fail the connection attempt, we don't want them to
try the second address, which likely yields test failures because of unexpected results
(for example, a different exception type).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-28 13:33:28 +02:00
Simone Bordet 5973ce2941
Small additional fixes.
* Removed "since" attribute (it's commonly related to Java versions) to avoid confusion.
* Avoid using getProxies() to modify the Proxy object in ProxyServletTest.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-25 09:52:55 +02:00
Gili Tzabari e2e59478ce Update in response to PR comments. 2022-10-24 13:17:25 -04:00
Gili Tzabari 48b89bdc2a Fixing checkstyle errors. 2022-10-24 13:04:14 -04:00
Gili Tzabari d50510a1fe Fixes #8723: Provide a thread-safe way to modify HttpClient proxies at runtime. 2022-10-24 13:04:14 -04:00
Jan Vojt 1f8b0c75a4 Issue #8753 - Fix HttpClient initialization with destinationIdleTimeout set.
Signed-off-by: Jan Vojt <jan@vojt.net>
2022-10-21 15:45:46 +02:00
Gili Tzabari 481c801c3c
Jetty 10 - #8591: Indicate units of HttpClient properties (#8728)
* Fixes #8591: Indicate units of HttpClient properties.
2022-10-19 18:34:34 +02:00
Simone Bordet ecea0e6d0a
Fixes #7993 - HttpClient idleTimeout configuration being ignored/over… (#8672)
* Fixes #7993 - HttpClient idleTimeout configuration being ignored/overridden

The problem was that the timeout scheduling was not happening,
because for TunnelRequest the timeouts were set in normalizeRequest(),
which runs after the scheduling.

Now a call to request.sent() is made also after normalizeRequest()
so that the timeouts is scheduled (if it was not scheduled before).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-05 11:46:00 +02:00
Simone Bordet 58f0e0744b Fixes #8584 - HttpRequest.send() never returns
Fixed handling of the idle timeout in case the SOCKS proxy does not reply to the SOCKS bytes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-05 11:45:13 +02:00
Simone Bordet 39bf8ff24d
Fixes #8623 - Use AutoLock in InputStreamResponseListener.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-27 12:39:20 +02:00
Olivier Lamy dbd07146ec
merge back release branch to bump version to 10.0.13-SNAPSHOT (#8593)
* Updating to version 10.0.12

* Updating to version 10.0.13-SNAPSHOT

* VERSION.TXT =+ content of jetty-9.4.49.v20220914 release

* remove strange line and reorder
2022-09-16 19:50:12 +10:00
Simone Bordet 77ad0189ba
Fixes #8532 - Review System.nanoTime() usages. (#8535)
* Fixes #8532 - Review System.nanoTime() usages.

Introduced o.e.j.util.NanoTime class to deal with nanoTimes.

Now NanoTime.now() should be used instead of System.nanoTime(),
and various <unit>[elapsed|since|until]() methods to calculate nanoTimes.

Furthermore, comparing 2 nanoTimes should be done via isBefore(),
rather than using the < operator, which is wrong as specified in
the System.nanoTime() javadocs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-06 09:30:02 +02:00
Ludovic Orban de13ceff36 Fixes #8493: RemoveIdleDestinations's race condition and improve logging.
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-09-01 14:45:41 +02:00
Ludovic Orban 50b7dc4bbc #8188: fix test flakiness by using a thread-safe collection to track leaded buffers
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-10 10:35:34 +02:00
Ludovic Orban 7b57307c71 #8188: fix test flakiness by handling null buffers returned by the pool
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-10 10:35:34 +02:00
Marc Philipp 4a6c2744a0 Grow request queue instead of pre-allocating it
To avoid excess allocation, in particular for higher values of
`MaxRequestsQueuedPerDestination`, the per-destination request queue is
now initialized with a capacity of 32 entries and configured to grow 32
entries at a time until the maximum is reached.

Resolves #8319.
2022-07-28 19:07:36 +02:00
Greg Wilkins 2b817f06c6
Combined ByteBufferPool (#8171)
All `ByteBufferPool` can now be accessed as `RetainableByteBufferPools`.

Users now need to configure only a single buffer pool and there is just the additional retained parameter that needs consideration.
Default buffer pool has been changed to logarithmic, but we may wish to review that before next release.
Default factor size has been increased to 4096.
2022-07-04 10:38:30 +10:00
Joakim Erdfelt 64d12e2a5a
Merge Release 10.0.11 back into `jetty-10.0.x` branch (#8194)
* Updating to version 10.0.11

* Updating to version 10.0.12-SNAPSHOT
2022-06-22 16:24:48 -05:00
Joakim Erdfelt c2bc103cb9
Merge Release 10.0.10 back into `jetty-10.0.x` (#8180)
* Updating to version 10.0.11-SNAPSHOT
2022-06-21 14:41:41 +02:00
Ludovic Orban 66de7ba618
Improve ssl buffers handling (#8165)
* Fixes #8161 improve SSLConnection buffers handling

Added memory heuristic to ArrayRetainableByteBufferPool

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-06-15 15:10:50 +02:00