Commit Graph

5426 Commits

Author SHA1 Message Date
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
Ludovic Orban 26d144d708 #6327 enable AsyncIOServletTest.testAsyncWriteClosed
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
Greg Wilkins b0140dae05
Fix #6562 last written bytebuffer (#6563) (#6579)
Fixes #6562 the last written bytebuffer calculation.
Also fixed an associated issue with unnecessary flush of an empty when last calculation already signalled last.
2021-08-05 09:13:12 +10:00
Greg Wilkins 4e3e99c5c5
Fix #6565 Deploy Symlinked applications (#6567)
Fix #6565 Deploy Symlinked applications by treating extracting context name (which becomes the default context path) from the base resource and then following aliases, so that base resource will not be an alias.   Added warning in ContextHandler if the base resource is an alias that we may not support this in future releases.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2021-08-02 18:16:34 +10:00
Jan Bartel 90a72b0798
Issue #6556 Ensure context classloader set when operating on memcache. (#6557)
* Issue #6556 Ensure context classloader set when operating on memcache.

Signed-off-by: Jan Bartel <janb@webtide.com>
2021-08-02 10:04:51 +10:00
Joakim Erdfelt 4d35dd736d
Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-6544-gziphandler-excludedMimeTypes 2021-07-30 07:25:18 -05:00
Ludovic Orban 73ab70d174 #6491 extract common parseAndFillForContent method
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2021-07-28 10:14:19 +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 1bdb69dc07
Issue #6544 - Fixing broken `jetty.gzip.excludedMimeTypeList` property support
+ Adding GzipHandler tests
+ Adding Gzip module tests
+ Updating jetty-gzip.xml for
  includedMimeTypesList and
  excludedMimeTypesList behavior
+ Adding GzipHandler support for
  setIncludedMimeTypesList(String) and
  setExcludedMimeTypesList(String

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-07-27 11:36:56 -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
Joakim Erdfelt c4021023ee
Merge pull request #6526 from eclipse/jetty-10.0.x-6520-errorhandler-valid-xhtml-xml
Issue #6520 - Fixing ErrorHandler output of text/html
2021-07-23 12:56:17 -05:00
Joakim Erdfelt 43954e7325
Fix javadoc issues
+ <td valign=""> attribute not supported
+ bad </p> in @param tag

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-07-22 07:46:00 -05:00
Joakim Erdfelt cb2aeb3c7a
Issue #6520 - Fixing ErrorHandler output of text/html
+ Updating tests to ensure that output is xml verified
+ Updating output to use `<hr>` element properly.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2021-07-16 20:15:55 -05: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
Lachlan 3c32afa05c
Issue #6473 - canonicalPath refactor & fix alias check in PathResource (Jetty-10) (#6478)
Issue #6473 - canonicalPath refactor & fix alias check in PathResource

* Reverted %-escape handling for URI query parts.
* Performing canonicalization in ServletContext.getResource(),
  and improving alias checking in ContextHandler.getResource().
* Performing canonicalization checks in Resource.addPath() to avoid
  navigation above of the root.
* Test added and fixed.
* Various cleanups.
* Improved javadoc and comments
* Compliance mode HttpURI uses UriCompliance.Violation

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Greg Wilkins <gregw@webtide.com>
2021-06-29 15:42:39 +02:00
Lachlan bc0fbbb5c1
Revert logic in Request.setMetaData, clear emptySegment on HttpUri.clear() (#6468)
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Manually merged as ECA checks are broken
2021-06-24 17:18:49 +10:00
Greg Wilkins 4673846635
Compliance modes documentation (#6312)
Added doco on compliance modes

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2021-06-24 15:20:05 +10:00
Lachlan d233f3be02
Issue #6447 - Deprecate support for UTF16 encoding in URIs (#6457)
Deprecate support for UTF16 encoding in URIs.
Add compliance mode to allow UTF16 encodings.
Improve testing.
2021-06-23 22:58:49 +10:00