Commit Graph

2630 Commits

Author SHA1 Message Date
Joakim Erdfelt c91e3fbc48
Updating to version 10.0.20-SNAPSHOT 2023-12-15 14:49:33 -06:00
Joakim Erdfelt 8492d1c78f
Updating to version 10.0.19 2023-12-15 14:38:06 -06:00
Simone Bordet efda646319
Fixes #11031 - HttpClient should expose Connection/EndPoint used by H… (#11033)
Introduced method Request.getConnection() to expose the Connection after at the request begin event.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-13 20:34:52 +01:00
Simone Bordet 90244c35d0
Removed forgotten Thread.sleep() in test.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-12 20:24:18 +01:00
Simone Bordet 8057cb30ba
Fixed test that was spin looping causing lots of allocations and GC pressure.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-12-12 20:19:44 +01:00
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