Commit Graph

5449 Commits

Author SHA1 Message Date
Ludovic Orban 44fb63e541 #7284 cleanup HttpInput reopen/recycle
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-16 14:19:56 +01:00
Ludovic Orban 12b14c5850 #7280 destroy interceptor when content producer gets recycled
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-12-15 11:13:58 +01:00
Lachlan e345ee28a5
Issue #7059 - prevent an internal NPE in AllowedResourceAliasChecker doStart (#7076)
- prevent an internal NPE in AllowedResourceAliasChecker doStart
- Fix LifeCycle issues with AllowedResourceAliasChecker
- add null check for protected targets in toString.
- improve warning message for AllowedResourceAliasChecker
- add AllowedResourceAliasCheckerTest
2021-12-07 09:37:11 +11:00
Lachlan 9b501022d5
Merge pull request #7166 from eclipse/jetty-10.0.x-6974-ByteBufferPool
Issue #6974 - improvements & fixes to ByteBufferPool implementations (#7017)
2021-12-03 14:46:16 +11:00
Lachlan Roberts 6172c96d80 update jetty-bytebufferpool-logarithmic.xml dtd to 10_0
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-12-02 20:02:10 +11: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
Lachlan Roberts 7abb1e62f2 Issue #7160- Add AMBIGUOUS_PATH_ENCODING to default UriCompliance mode.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-11-30 16:51:58 +11:00
Lachlan c19921e60f Issue #6974 - improvements & fixes to ByteBufferPool implementations (#7017)
- WebSocket should user server ByteBufferPool if possible
- fix various bugs ByteBufferPool implementations
- add heuristic for maxHeapMemory and maxDirectMemory
- Add dump for ByteBufferPools
- add LogArrayByteBufferPool that does exponential scaling of bucket size.
- ByteBufferPools should default to use maxMemory heuristic
- Add module jetty-bytebufferpool-logarithmic

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2021-11-25 10:42:47 +11:00
Lachlan dd0613193c
Merge pull request #7000 from eclipse/jetty-10.0.x-1087-WellKnown
Issue #1087 - add module for a .well-known handler
2021-11-17 09:51:26 +11:00
Lachlan Roberts 1d88a52647 Issue #1087 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-11-12 13:55:08 +11:00
Lachlan Roberts bfd9d59ef5 Issue #7062 - remove the old test-keystore.p12 file
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-11-12 11:26:07 +11:00
Joakim Erdfelt f5bb6991b7
Issue #7031 - Fixing ResponseWriter (#7032)
+ Improving test coverage on response.getWriter()
  and response.getOutputStream() usage

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-10-26 10:29:27 -05:00
Lachlan Roberts 1c91fbe9b9 Issue #1087 - improvements to the documentation
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-10-25 10:54:30 +11:00
Lachlan Roberts dcc6cc435f Issue #1087 - add documentation and distribution test
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-10-22 16:43:22 +11:00
Lachlan 06a899f298
Merge pull request #6976 from eclipse/jetty-10.0.x-4317-GzipHandler-SSE
Issue #4317 - exclude text/event-stream MIME type from GzipHandler
2021-10-20 19:32:47 +11:00
Lachlan Roberts 6a3abd9770 Issue #1087 - add module for a .well-known handler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-10-15 14:05:33 +11:00
Lachlan Roberts 4682e6381f Issue #6497 - add warnings for alias checker deprecations
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-10-15 12:01:35 +11:00
Lachlan Roberts 32187fb458 Issue #4317 - exclude text/event-stream MIME type from GzipHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2021-10-11 13:37:07 +11: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
Greg Wilkins aac366c300
Fix #6883 relative welcome redirect (#6886) (#6894)
* Fix #6883 relative welcome redirect (#6886)

Fix #6883 relative welcome redirect
 + make all redirects able to be relative
 + added test for relative redirection in ResourceService

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2021-09-23 15:37:56 +10:00
Greg Wilkins 9a14de058d
Fix #6860 IPv6 Format (#6861) (#6885)
Fix #6860 IPv6 format by adding an extensible HttpChannel method

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
2021-09-22 21:03:23 +10:00
Greg Wilkins aa793eeafe
Jetty 10.0.x 6497 alias checkers alt (#6681)
* Issue #6497 - Replace the Alias checkers with new implementation.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
2021-09-21 18:35:51 +10:00
Greg Wilkins 0dc5371167
Fix #6869 HTML Error page charset (#6873) (#6878)
Fix #6869 HTML Error page charset passed as request attribute

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2021-09-21 16:08:01 +10:00
Jan Bartel d3bfb61761
Jetty 10.0.x 6687 upgrade infinispan (#6766)
* Issue #6687 Update to infinispan 11.0.11

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


* fix upperbound dependency
* use infinispan bom

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

Co-authored-by: Olivier Lamy <oliver.lamy@gmail.com>
2021-09-21 11:16:50 +10:00
Greg Wilkins f398da7200
Fix #6868 Fix copy constructors (#6872)
* Fix #6868 Fix copy constructors

Fixed copy constructors found by static code analysis

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2021-09-20 15:14:42 +10:00
Joakim Erdfelt a223815cbf
Issue #6752 - Extensible DefaultSessionCache map implementation
More changes requested from review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-09-14 21:00:04 -05:00
Joakim Erdfelt 8991b7f452
Issue #6752 - Extensible DefaultSessionCache map implementation
Addressing changes requested from review

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-09-14 20:23:49 -05:00
Joakim Erdfelt 8788aaef5a
Issue #6752 - Extensible DefaultSessionCache map implementation
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-09-14 20:23:48 -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
Padraic Renaghan 96945c7e10
Issue #6752 DefaultSessionCache more extensible using ConcurrentMap (#6753)
DefaultSessionCache is designed to be extended, by virtue of its protected session map. Subclasses can set their own map instance instead. However the session map is specified as ConcurrentHashMap, when it only needs to be ConcurrentMap.
Changed data type to ConcurrentMap to allow for wider options for subclasses, such as those wanted to use Caffeine's asMap() method which returns ConcurrentMap.
Although changing to even more relaxed Map would work, that does not provide as much clarity that the map will be used concurrently - therefore used ConcurrentMap instead.

Signed-off-by: Padraic Renaghan <padraic@renaghan.com>
2021-09-10 10:08:42 +10:00
Ludovic Orban 2231e6496e update javadoc of input state methods
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-09-06 15:47:07 +02:00
Ludovic Orban cd4166ce5b update HttpInput puml diagrams
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-09-06 15:47:07 +02: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
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 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
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 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 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 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 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
Greg Wilkins 2f80582615
Fix flaky test from #6562 (#6627)
Fix flaky test from #6562

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2021-08-17 14:05:16 +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 a99ff502d1 #6327 enable more disabled tests
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-08-12 10:47:24 +02:00
Ludovic Orban 999b3ca11e #6327 enable ResourceHandlerTest.testSlowBiggest
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-08-12 10:47:24 +02:00
Ludovic Orban 5dc856196e #6327 extract HttpOutput._apiState value from toString
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-08-12 10:47:24 +02:00