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>
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>
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>
Fix#6227 Async timeout dispatch race
Only allow the thread calling onTimeout to call dispatch and complete once timeout has expired.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* More optional etag gzip fixes for #5979
IF no separator defined, do not add a suffix to an etag.
Some cleanup of the implementation.
* More optional etag gzip fixes for #5979
updates from review
* enable spotbugs in CI
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
record issues
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
use warning new generation
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
activate errorprone
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
fix Jenkinsfile
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
do not run spotbugs for jetty-runner as we do not want to fix all dependencies bugs :)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
junit should allow empty results
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
maven console can be use only once...
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
one liner
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
recordissues only once
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
force id
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
aggregate results
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
configure a name for aggregated reports
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
mo more -T3 no need anymore of remote session test profile
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
I want to see what failing tests look like with new report.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
skip spotbugs for jetty-jmh
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
get rid of findbugs as we now have spotbugs
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
Revert "I want to see what failing tests look like with new report."
This reverts commit df0d13e4c53d7461872e1f925ec06bd36e4a66c9.
activate errorProne parser
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
make pmd quiet for CI
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
remove -fae flag and do not display transfer progress
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
try junitParser() to see what it does
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
junit parser is a bad idea...
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
increase timeout
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
no -T2 for javadoc
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
fix skip spotbugs and pmd verbose
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
* remove -T options
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
Removed the jetty-server and jetty-servlet test-jar artifacts.
The only one left is the jetty-maven-plugin test-jar.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Issue #5357 - Updating to https://eclipse.org/
- Removing redundant <url> refs in pom.xml
- Correcting bad indenting from merge
- Correcting mailing list references
- Correcting bugs.eclipse.org references
- Correcting text file references
- Correcting html references
- Correcting further references
- Correcting download.eclipse.org reference
- Adding test for demo-base /proxy/current/
- Ensuring jetty-client is included in javadoc-proxy.war/WEB-INF/lib
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ Currently there's no way to respond to rejected/throttled/delayed
requests that the DoSFilter impacts.
A Listener has been added to allow for any behaviors needed
by a user of the DoSFilter on requests that have been
impacted by the DoSFilter.
+ Introducing OverLimit and RateType to DoSFilter internals
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
On the client:
* Origin.Address.host is passed through HostPort.normalizeHost(),
so that if it is IPv6 is bracketed.
Now the ipv6 address passed to an `HttClient` request is bracketed.
* HttpRequest was de-bracketing the host, but now it does not anymore.
On the server:
* Request.getLocalAddr(), getLocalName(), getRemoteAddr(),
getRemoteHost(), getServerName(), when dealing with an IPv6 address,
return it bracketed.
The reason to return bracketed IPv6 also from *Addr() methods is that
if it is used with InetAddress/InetSocketAddress it still works, but
often it is interpreted as a URI host so brackets are necessary.
* DoSFilter was blindly bracketing - now it does not.
Added a number of test cases, and fixed those that expected
non-bracketed IPv6.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Replaced relevant usages of synchronized with AutoLock.
* Made AutoLock serializable since classes that use it may be stored in the HttpSession.
* Added convenience methods to AutoLock to execute lambdas with the lock held.
* Introduced AutoLock.WithCondition to use a Lock and a Condition together.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Made HttpURI, HttpFields and MetaData immutable. The first two follow the same builder pattern and MetaData is constructor injection only.
* Immutable version of HttpFields
Preserve API and usage of HttpFields class while providing a read only interface and immutable implementation.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable version of HttpFields
Use an ArrayList in HttpFields. While slightly slower than the array, it will mostly be used as a builder pattern for an Immutable
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable version of HttpFields
Fixed exception type.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable version of HttpFields
asImmutable method
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData
Made HttpURIU immutable with a builder pattern.
MetaData immutable and working within http module.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData
Fixes from review
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData
Passing tests upto and including jetty-server
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData
Cleanup of HttpURI.Builder API as suggested in PR.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData
Added builder for MetaData.Request
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData
more api fixes
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData
WIP making HttpFiels itself immutable. Currently working up to jetty-servlet.
Need to consider if content-length really is meta data and how much and when can we trust it.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData
WIP
Need to consider if content-length really is meta data and how much and when can we trust it. Also need to consider difference between h2 and h1 authority in metadata.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
jetty-client and jetty-servlet passing tests.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
Better align the style of immutability between `HttpFields` and `HttpURI`.
They both now have static build() and from() methods, plus Builder and Immutable implementations.
Potentially `Builder` could be renamed as `Mutable`
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
http2-server tests passed
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
http2-client tests passed
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
cleann build?
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
fix
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
more test fixes
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
Cleanups, mostly using EMPTY when appropriate.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
Cleanups, use immutable
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
No trailers for connect
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
Fix CONNECT path handling
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
fixed rewrite query handling
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
rename Builders to Muttables
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
misc cleanups
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
Revert to using arrays due to garbage generated by streams and iterators (12% of a simple benchmark!).
Even if this garbage is an artifact of the JIT being disabled by observation, it can hide other allocations, so best to just use simple arrays!
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
More optimizations and better test coverage.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable Metadata
various cleanups
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
More optimizations
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
review changes
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
changes after review:
+ less usage of Mutable
+ more usage of EMPTY
+ restored fragment handling
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
changes after review:
+ less usage of Mutable
+ less usage of asImmutable
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData WIP
changes after review:
+ less usage of Mutable
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData
changes after review:
+ better handling of URI in ContextHandler
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData
changes after review:
+ downcast in test to access mutable response headers.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* Immutable MetaData
changes after review:
+ use put instead of add for one time headers
Signed-off-by: Greg Wilkins <gregw@webtide.com>
* private
Signed-off-by: Greg Wilkins <gregw@webtide.com>
+ Renamed TestDirContentServlet to AbstractFileContentServlet
+ Renamed various TestServlet*Write classes to BlockingServlet*Write to better
represent their purpose.
+ Renamed TestServletBufferTypeLengthWrite to HttpOutputWriteFileContentServlet
+ Cleaned up GzipContentLengthTest to be one big ParameterizedTest
- now does Internal vs External GzipHandler testing too.
+ Introduced AbstractGzipTest to house simple common methods
+ Cleanup remaining testcases
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Restored IncludedGzipTest.
Fixed ServletContextHandler.relinkHandlers(), now excluding
the checks for GzipHandler.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Introducing jetty-slf4j-impl
* Make Jetty use org.slf4j
* Removed most of org.eclipse.jetty.util.log classes
* Left org.eclipse.jetty.util.log.Log and
org.eclipse.jetty.util.log.Logger but as
simple bridge classes that are deprecated
* Migrated code using org.eclipse.jetty.util.log.StacklessLogging
to org.eclipse.jetty.logging.StacklessLogging found in
the jetty-slf4j-impl
* Moved logging start modules from jetty-util to jetty-home
* Simplified logging start modules
* Updated code that was using StdErrLog directly
* Updating module-info.java for org.slf4j
* removing org.eclipse.jetty.util.log.class references
* jetty-start supports manually declared default provider
+ and we use it to default "logging" to the "logging-jetty" provider
* Cleaning up jetty-maven-plugin and IT testing for Logging
* Using old slf4j for it testing
* Updating compiler config to show Xlint:exports warnings
* Updating console-capture and logging-noop
* Adding slf4j bridge (capture) jetty modules
* Updates to jetty logging module locations
* Changing reference to slf4j dependent mod
* Process requested enabled modules in topological order
* Limiting inclusions in shaded jetty-start
+ Also adding note to jetty-util classes that are used by
jetty-start
* Default logging level on baseline logging config is INFO (not DEBUG)
* Changing from system to server classes in logging
* Updating other modules to use new logging names
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>