Commit Graph

2551 Commits

Author SHA1 Message Date
Ludovic Orban 4b6bcca529 get rid of promoteSession()
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban b8f39b5b2c get rid of HttpClientTransportOverQuic and IClientConnector
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban 16cbcc0e4f HttpDestination can now be told to use cleartext even when the scheme is secure
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban c19988af28 create stream 0 when client connection is set up
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Ludovic Orban fe5c65820d introduce IClientConnector interface
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-20 09:33:38 +01:00
Simone Bordet cb25a83667
Issue #6728 - Prepare for QUIC and HTTP/3 (#7100)
* Issue #6728 - QUIC and HTTP/3

Modifications to Jetty to prepare for QUIC/HTTP3.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-12-01 09:39:51 +01:00
Ludovic Orban f048f4dd95 #7107: handle review comments 2021-11-22 09:48:25 +01:00
Ludovic Orban 3c019fabd3 #7107: fix too-eager closing of multiplexed connections marked as closed but still in use 2021-11-22 09:48:25 +01:00
Joakim Erdfelt cd1f146867
Issue #7131 - use Charset object instead of String (#7137)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-11-19 16:17:28 -06:00
Joakim Erdfelt cfc67f86d2 Updating to version 10.0.8-SNAPSHOT 2021-10-06 14:51:32 -05:00
Joakim Erdfelt da8a4553af Updating to version 10.0.7 2021-10-06 14:32:37 -05:00
Simone Bordet 0412bdc3d9 Fixes #6938 - module-info.java file do not use the canonical order for the elements
Changed order of entries in module-info.java to be canonical

(cherry picked from commit 02691171d5)
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-10-01 09:25:55 +02:00
Olivier Lamy 51d44a3401
use dependencyManagement for internal dependencies (#6940)
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2021-09-30 16:57:19 +10:00
Joakim Erdfelt 8dd62838f7
Initial cleanup / reorg of dependencies
+ All plugins and dependencies are alphabetized now
+ All plugins and dependency versions have properties now

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-09-22 09:54:52 -05:00
dependabot[bot] b44dde6098
Bump maven-enforcer-plugin from 3.0.0-M3 to 3.0.0 (#6755)
* Bump maven-enforcer-plugin from 3.0.0-M3 to 3.0.0

Bumps [maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.0.0-M3 to 3.0.0.
- [Release notes](https://github.com/apache/maven-enforcer/releases)
- [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.0.0-M3...enforcer-3.0.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-enforcer-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix some upper bound issues and exclude more javax

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

* fix upperbound dependencies issue with enforcer plugin upgrade

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

* exclude this wrong which makes enforcer plugin fail and btw it's not used

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

* fix last enforcer upperbound issues

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Olivier Lamy <oliver.lamy@gmail.com>
2021-09-14 06:10:48 +10:00
dependabot[bot] 3af084ee3a
Bump json-smart from 2.3 to 2.4.7 (#6763)
Bumps [json-smart](https://github.com/netplex/json-smart-v2) from 2.3 to 2.4.7.
- [Release notes](https://github.com/netplex/json-smart-v2/releases)
- [Commits](https://github.com/netplex/json-smart-v2/commits)

---
updated-dependencies:
- dependency-name: net.minidev:json-smart
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-10 10:27:17 +10:00
Simone Bordet e2690cc420
Fixes #6603 - HTTP/2 max local stream count exceeded (#6639) (#6682)
* Fixes #6603 - HTTP/2 max local stream count exceeded (#6639)

Made MAX_CONCURRENT_STREAMS setting work on a per-connection basis.
Updated Pool javadocs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Greg Wilkins <gregw@webtide.com>
(cherry picked from commit 525fcb3119)
2021-09-01 10:27:40 +02:00
Lachlan 0a78b9845d
Merge pull request #6657 from eclipse/jetty-10.0.x-6642-WebSocketConnectionHeaders
Issue #6642 - WebSocket handling of Connection: upgrade,close.
2021-08-31 14:25:47 +10:00
Lachlan Roberts 949aa6c342 Issue #6642 - move shutdown logic into HttpChannelOverHTTP and HttpConnection
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-27 11:53:54 +10:00
Joakim Erdfelt c5a33e27d2
Issue #5684 - Windows test overhaul (#6581)
Issue #5684 - Window's test overhaul

+ Migrate from @DisabledOnOs(WINDOWS) to assumptions on capabilities instead.
+ Fix other outstanding windows testing issues.
+ Cleanup FileBufferedResponseHandlerTest expectations on Windows.
+ PathWatcher scan interval is variable on windows
+ If unable to start testcase based on assumption,
  the stop shouldn't fail testcase
+ Increase various wait timeouts
+ Make tests less strict due to system speed issues
+ Disable Sni tests due to TLS behaviors differences in Windows
  + Windows TLSv1.3 seems to introduce this difference
  + If we restrict to TLSv1.2 this passes.
  + On Linux TLSv.13 on client side will always return a
  + javax.net.ssl.SSLHandshakeException in those test cases that expect it.
  + However, on Windows, Only the TLSv1.2 implementation will return a javax.net.ssl.SSLHandshakeException,
  + All other TLS versions on Windows will result in a
  + javax.net.ssl.SSLException: Software caused connection abort: recv failed
+ Disable ConcurrentStreamCreationTest
  + Not possible to create all of these streams.
+ Fixing DeploymentTempDirTest
  + Using unique workdir per testcase.
  + Don't expect to delete files / directories between tests
    (not supported on windows due to file locking anyway)
 + Fixing line ending difference on windows
 + InvalidPathException is a 404 Not Found
 + Cannot reuse test directory between runs due to memory mapped files that are still in use from previous run.
 + java.nio.file.FileSystemException: C:\code\jetty.project\jetty-webapp\target\tests\welcome#\index.html: The requested operation cannot be performed on a file with a user-mapped section open.

	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:235)
	at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:478)
	at java.base/java.nio.file.Files.newOutputStream(Files.java:220)
	at org.eclipse.jetty.webapp/org.eclipse.jetty.webapp.WebAppDefaultServletTest.prepareServer(WebAppDefaultServletTest.java:84)

 + As is typical on windows, we are often unable to delete a file due to file locking issues.
 + Use a unique resource base between tests.
   This is to avoid file locking behaviors that prevent the
   resource base from being reused too quickly on windows.
 + Prevent test run if symlinks not supported
 + Allowing for Windows slosh char as well in asserts
 + SelectorUtils is File.separator dependent
 + Regex is now FS.separator independent
 + Using SelectorUtils from plexus correctly for include/exclude
 + Turning off mapped files for testing reasons.
 + Fix and re-enable RFC2616NIOHttpsTest
 + Issue #6552 - Fix test failures due to slf4j dep
 + Issue #6552 - upgrade testcontainers
 + Issue #6552 - move to assumption based docker existence
 + Issue #6552 - Fix enforcer rule violation on jna.
  Addresses the following side effect of upgrading testcontainers.

[WARNING] Rule 3: org.apache.maven.plugins.enforcer.RequireUpperBoundDeps failed with message:
Failed while enforcing RequireUpperBoundDeps. The error(s) are [
Require upper bound dependencies error for net.java.dev.jna:jna:5.6.0 paths to dependency are:
+-org.eclipse.jetty:infinispan-remote-query:10.0.7-SNAPSHOT
  +-org.testcontainers:testcontainers:1.16.0
    +-com.github.docker-java:docker-java-transport-zerodep:3.2.11
      +-net.java.dev.jna:jna:5.6.0 (managed) <-- net.java.dev.jna:jna:5.8.0

 + use annotation to disable test when docker not available and needed
 + Disabling FileSessionDistributionTests.stopRestartWebappTestSessionContentSaved on Windows
 + Using TLS basic
 + Programmatic removal of memory mapped behavior during testing
 + Fixing slf4j warning

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Olivier Lamy <oliver.lamy@gmail.com>
2021-08-26 11:26:46 -05:00
Simone Bordet 9f896c6390 Fixes #6624 - Non-domain SNI on java17
Java 17 only allows letter|digit|hyphen characters for SNI names.

While we could bypass this restriction on the client, when the SNI bytes arrive to the server they will be verified and if not allowed the TLS handshake will fail.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
(cherry picked from commit 693663a4ce)
2021-08-19 13:56:29 +02:00
Greg Wilkins a5b1845e60
Disable ipv6 test for #6624 (#6625) (#6629)
Temp disable of test that is breaking the build.
2021-08-17 16:15:00 +10:00
Simone Bordet dbc0ce7c13
Fixes #6372 - Review socket options configuration (#6610)
* Fixes #6372 - Review socket options configuration

Introduced in ClientConnector:

* tcpNoDelay
* reusePort
* receiveBufferSize
* sendBufferSize

Reworked configuration of socket options in ClientConnector.
JMX-ified ClientConnector.

Introduced reusePort in ServerConnector.
Updated server modules with the new reusePort property.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-08-13 17:39:52 +02:00
Ludovic Orban 15bef0c9ed #6327 rework testRequestIdleTimeout and merge http(s) and fcgi test
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-08-12 10:47:24 +02:00
Ludovic Orban 1a15f2c48d #6327 enable more disabled tests, using awaitility and shortening wasteful sleeps
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-08-12 10:47:24 +02:00
Ludovic Orban 0108a197e8 #6327 enable disabled HttpConnectionLifecycleTest tests, using awaitility to remove wasteful sleeps
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-08-12 10:47:24 +02:00
Ludovic Orban 56eed8211e #6327 enable HttpClientTest.testRequestIdleTimeout
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-08-12 10:47:24 +02:00
Simone Bordet 49a08450c2
Fixes #6043 - Reimplement UnixSocket support based on Java 16. (#6522)
Fixes #6043 - Reimplement UnixSocket support based on Java 16.

* Introduced new module "jetty-server-unixdomain".
It uses reflection to access the Java 16 Unix-Domain classes to keep compatibility with the other modules and the build.
* Added Jetty module with only HTTP/1.1 support for now (requires review of the modules to reuse them with various connectors).
* Updated documentation to mention UnixDomainServerConnector.
* Updated client libraries to support Unix-Domain.
* Updated PROXY protocol implementation to support Unix-Domain.
* Replaced unix.socket.tmp with better named jetty.unixdomain.dir property.
Defaulted jetty.unixdomain.dir property to system property user.home under Windows.
Simplified code that runs Unix-Domain tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-08-05 10:04:37 +02:00
Ludovic Orban bd11d6f682 #6491 add defensive check and introduce HttpParser.isTerminated()
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-07-28 10:14:19 +02:00
Joakim Erdfelt a4053578cb
Merge pull request #6547 from eclipse/jetty-10.0.x-optimize-imports
Remove unused import lines
2021-07-27 12:53:01 -05:00
Joakim Erdfelt fdc210f382
Remove unused imports
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-07-27 08:03:00 -05:00
Joakim Erdfelt 330fc0ba0b
Merge pull request #6537 from eclipse/jetty-10.0.x-tls-test-revamp
Issue #5684 - Update TLS tests
2021-07-27 07:44:21 -05:00
Ludovic Orban c9a5d8df58 #6322 Use RetainableByteBuffer and write a new pool for it
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-07-24 11:14:21 +02:00
Joakim Erdfelt 713136fb0e
Issue #5684 - Update TLS tests
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-07-23 13:33:57 -05:00
Ludovic Orban e1daaed90b #6443 wait for handshake to be done before closing the socket
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-07-08 11:57:39 +02:00
Joakim Erdfelt c245a70893 Updating to version 10.0.7-SNAPSHOT 2021-06-29 10:51:22 -05:00
Joakim Erdfelt 37e7731b4b Updating to version 10.0.6 2021-06-29 10:27:56 -05:00
Ludovic Orban c753ca0db5 #6455 disable MaxDuration mechanism in testConnectionMaxUsage as it clashes with the test's assertions
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-06-29 10:18:56 +02:00
Simone Bordet 1a594cef60 Fixes #6382 - HttpClient TimeoutException message reports transient values.
Now using consistently HttpConversation.getTimeout() to report the accurate value.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
(cherry picked from commit 734d3b672c)
2021-06-21 18:36:02 +02:00
Simone Bordet b8d6e3f010
Fixes #6410 - Use SocketAddress instead of InetSocketAddress. (#6414)
* Fixes #6410 - Use SocketAddress instead of InetSocketAddress.

Removed usages of InetSocketAddress in method signatures where possible.
Deprecated old methods, and added new methods with SocketAddress.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-06-17 10:18:08 +02:00
Joakim Erdfelt 9d2d1e29b7 Updating to version 10.0.6-SNAPSHOT 2021-06-11 09:42:42 -05:00
Joakim Erdfelt dc21b2d73c Updating to version 10.0.5 2021-06-11 09:18:00 -05:00
Jan Bartel 900c71902c
Issue #6327 Remove DisabledOnJre or test where appropriate (#6386)
Signed-off-by: Jan Bartel <janb@webtide.com>
2021-06-10 21:26:16 +10:00
Joakim Erdfelt 987066aac1 Updating to version 10.0.5-SNAPSHOT 2021-06-04 13:28:47 -05:00
Joakim Erdfelt 5523480c54 Updating to version 10.0.4 2021-06-04 13:09:44 -05:00
Simone Bordet 21aba4a724 Fixes #6323 - HttpClient requests with redirects gets stuck/never calls onComplete()
* Reworked the total timeout handling.
* Now a CyclicTimeouts handles the exchanges in each HttpDestination,
and a CyclicTimeouts handles the exchanges in each HttpConnection
(rather than in HttpChannel).
* Now adjusting the total timeout for copied requests generated by
redirects and authentication.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
(cherry picked from commit 2e7d17400f)
2021-06-04 12:12:40 +02:00
Simone Bordet c151b04535 Fixes #5931 - SslConnection should implement getBytesIn()/getBytesOut(). (#6335)
Updated ConnectionStatistics to report both the stats of all connections,
and the stats grouped by connection class.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
(cherry picked from commit f902d12fe8)
2021-06-03 15:16:12 +02:00
Simone Bordet cfcb2efa80
Fixes #6276 - Support non-standard domains in SNI and X509. (#6296) (#6311)
* Fixes #6276 - Support non-standard domains in SNI and X509. (#6296)

Improved support for IP addresses in X509 (after #5379).
Introduced SslContextFactory.Client.SniProvider to allow applications to specify the SNI names to send to the server.
Improved logging of SNI processing.
Skip X509 matching over IP addresses when the host does
not look like an IP address, to avoid reverse DNS lookup.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
(cherry picked from commit 04df6d4ec2)
2021-05-24 16:57:57 +02:00
Simone Bordet 9ace21992e Updated POM versions to 10.0.4-SNAPSHOT.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-05-21 17:07:46 +02:00
Simone Bordet 92f6eabb26 Fixes #6272 - Reduce allocation in HttpClient when notifying content listeners.
Avoid to allocate ContentListeners for every response.
Avoid using Java streams to reduce allocation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2021-05-17 10:28:28 +02:00