Commit Graph

23319 Commits

Author SHA1 Message Date
Lachlan Roberts d41a297352 Issue #6696 - don't keep Request object in the WebSocketNegotiation after upgrade
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-09-06 17:14:53 +10:00
Lachlan dff5e14bb5
Merge pull request #6680 from eclipse/jetty-10.0.x-6601-WebSocketJPMS
Issue #6601 - fix JPMS issues for websocket-core-common
2021-09-02 10:24:08 +10:00
Jan Bartel db1c65564f
Issue #6327 Remove/re-enable disabled ShutdownMonitorTest tests (#6630)
Signed-off-by: Jan Bartel <janb@webtide.com>
2021-09-02 10:18:44 +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
Joakim Erdfelt f129770f4e
Bump slf4j to 2.0.0-alpha5 (#6684)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-08-31 09:53:15 -05: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 59a5b7c9ef Changes from review.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-31 11:28:59 +10:00
Lachlan Roberts edcb215ac7 Issue #6642 - use request UPGRADE_CONNECTION_ATTRIBUTE instead of 101 response.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-31 10:51:45 +10:00
Lachlan 453bcbb8c5
Merge pull request #6635 from eclipse/jetty-10.0.x-6566-WebSocketMessageSinks
Issue #6566 - use the demand API for the websocket MessageSinks
2021-08-31 10:19:58 +10:00
Lachlan Roberts 763820e111 ByteBufferCallbackAccumulator.writeTo should do buffer flipping
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-30 14:58:16 +10:00
Lachlan Roberts b2657f1376 fix broken tests: use buffer.remaining() instead of BufferUtil.space()
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-30 12:45:32 +10:00
Lachlan Roberts ead1f6b160 Issue #6601 - export websocket-core-common to jetty-util for DecoratedObjectFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-30 11:43:54 +10:00
Lachlan Roberts e64b390fd6 Issue #6601 - add proper JPMS testing for websocket-core
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-30 11:11:20 +10:00
Olivier Lamy 4be1e63bc1
Issue #6605 cherry-pick changes flaky test HttpOutputTest#testEmptyBufferKnown 10.0.x branch (#6651)
* #6605 testEmptyBufferKnown: make sure the assertion does not happen before the committed flag is read

Signed-off-by: Ludovic Orban <lorban@bitronix.be>

* #6605 rename test

Signed-off-by: Ludovic Orban <lorban@bitronix.be>

Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2021-08-28 19:28:02 +10:00
Lachlan Roberts 7569e4b07a Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-6566-WebSocketMessageSinks 2021-08-27 17:21:53 +10:00
Lachlan Roberts 2d4693a288 Issue #6642 - check for null Metadata in HttpConnection
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-27 14:51:07 +10:00
Lachlan f10ae7c955
Merge pull request #6649 from eclipse/jetty-10.0.x-jetty-jaspi
Issue #6406 - backport of jetty-jaspi changes to jetty-10 (#6412)
2021-08-27 13:20:51 +10:00
Lachlan 5954fc2ca2
Merge pull request #6569 from eclipse/jetty-10.0.x-6554-SecurityHandler
Issue #6554 - create the DefaultIdentityService even if no realmName is provided
2021-08-27 13:12:35 +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
Lachlan Roberts 1dce9df48d Issue #6566 - cleanups of ByteBufferCallbackAccumulator
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-27 11:49:18 +10:00
Lachlan Roberts 4d579d682c Issue #6406 - backport jetty-jaspi changes to 10.0.x
Co-authored-by: Frode Carlsen <frode.odde.carlsen@nav.no>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-27 11:30:16 +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
Lachlan Roberts 83f2265653 Issue #6642 - never shutdown output after generating a request.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-26 14:18:28 +10:00
Lachlan Roberts fa316fc20d Issue #6642 - never shutdown output after generating a request.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-26 13:09:36 +10:00
Simone Bordet 2689cf75d1
Fixes #6646 - Propagate callback invocation type to avoid deadlock in SmallThreadPoolLoadTest
Fixed occurrences of Callbacks that did not override getInvocationType() to properly declare whether they block or not.

Added test case for blocking writes for both client and server.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
(cherry picked from commit 9897c1b06e)
2021-08-26 09:28:33 +10:00
Joakim Erdfelt 3badb8629f
Merge pull request #6655 from eclipse/jetty-10.0.x-6654-websocket-upgrade-npe-request-cookies
Issue #6654 - Fix NPEs from bad Servlet API use
2021-08-25 13:48:30 -05:00
Joakim Erdfelt 325739b0fc
Merge pull request #6663 from eclipse/jetty-10.0.x-6661-windows-socket-setoptions
Issue #6661 - Make ServerConnector socket options setting optional
2021-08-25 06:03:30 -05:00
Simone Bordet e8beb58baf Fixes #6652 - Improve ReservedThreadExecutor dump. (#6653)
Fixes #6652 - Improve ReservedThreadExecutor dump.

Filtering out non-reserved threads in dump() and doStop().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Greg Wilkins <gregw@webtide.com>
(cherry picked from commit b2a023675c)
2021-08-25 10:18:04 +02:00
Lachlan Roberts 705fe19e2a Issue #6554 - add test for creation of DefaultIdentityService
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-25 12:10:06 +10:00
Lachlan Roberts cb9a8d4060 Issue #6642 - change HttpGenerator state to END before returning
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-25 11:27:56 +10:00
Joakim Erdfelt 18b66d1d47
Merge pull request #6622 from eclipse/jetty-10.0.x-upgrade-slf4j
Bump slf4j to 2.0.0-alpha4
2021-08-24 16:49:01 -05:00
Joakim Erdfelt 54edcefd66 Issue #6661 - Make ServerConnector socket options setting optional 2021-08-24 16:45:06 -05:00
Joakim Erdfelt ec842078a2 Issue #6661 - Make ServerConnector socket options setting optional 2021-08-24 16:18:34 -05:00
Joakim Erdfelt a82b45c5fb
Issue #6654 - Fix NPEs from bad Servlet API use
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-08-24 09:05:47 -05:00
Lachlan Roberts f7d9d8fcf8 Issue #6642 - prevent connection close after websocket upgrade
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-24 19:39:34 +10:00
Lachlan e3e630bdf0
Merge pull request #6568 from eclipse/jetty-10.0.x-6553-SecurityHandler
Issue #6553 - give 403 response if UNAUTHENTICATED and auth is mandatory
2021-08-24 14:04:54 +10:00
Lachlan Roberts fd6c72c668 Issue #6566 - do not duplicate size count for binary MessageSinks
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-24 10:55:47 +10:00
Lachlan Roberts 0fc025d526 Issue #6642 - add tests for WebSocket Connection Headers.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-24 10:37:18 +10:00
Joakim Erdfelt 32e6698f0b
Issue #6654 - Fix NPEs from bad Servlet API use
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-08-23 16:01:32 -05:00
Joakim Erdfelt 401f1959d2
Issue #6654 - Fix NPEs from bad Servlet API use
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-08-23 11:38:15 -05:00
Lachlan Roberts a508fc5eef Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-6553-SecurityHandler 2021-08-20 20:19:25 +10:00
Lachlan Roberts b854b0b1db Issue #6553 - revert behaviour for DeferredAuthentication
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-20 20:17:25 +10:00
Lachlan Roberts a27018bc39 Issue #6553 - add tests, use 401 code instead of 403, add same check for DeferredAuth
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-20 20:00:31 +10:00
Jan Bartel b2c420a124
Issue #6327 Ensure TempDirTest runs in envs other than CI (#6638)
* Issue #6327 Ensure TempDirTest runs in envs other than CI

Signed-off-by: Jan Bartel <janb@webtide.com>

* pass sysproperty env=ci to surefire run

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

Co-authored-by: Olivier Lamy <oliver.lamy@gmail.com>
2021-08-20 11:40:18 +10: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
Lachlan Roberts bd396f867b Fix some more unstable tests.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-08-19 20:43:13 +10:00
Lachlan c150ce6859
Merge pull request #6621 from eclipse/jetty-10.0.x-6617-openidBasicAuth
Issue #6617 - add support for the client_secret_basic authentication method
2021-08-19 16:19:15 +10:00
Lachlan ee24872d09
Merge pull request #6620 from eclipse/jetty-10.0.x-6618-OpenID-audArray
Issue #6618 - azp claim should not be required for single value aud array
2021-08-19 09:36:33 +10:00
Olivier Lamy 1acf54ba59
Upgrade h2spec-maven-plugin to 1.0.6 (#6616)
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2021-08-19 09:06:52 +10:00
Joakim Erdfelt efb09607f1
Bump slf4j to 2.0.0-alpha4
Also logback to 1.3.0-alpha9

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-08-18 05:44:51 -05:00