Added support in oej.http.HttpCookie.
Bridged support for Servlet cookies via the cookie Comment attribute.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Revert pgrep usage in jetty.sh
* Adding test for jetty.conf
* Correcting renamed xml file
* Improved started check
+ Improved `started` function code
- adding comment explaining steps
- adding named parameters
+ Improved ARGS check for "jetty.state="
option, to know when to check the
state file.
* Make sure state.mod is before any deploy steps to ensure jetty-state file is created early.
* Early cleanup / creation of State file
* Improved `started` function
+ Don't attempt to read from State File
if it doesn't exist
+ Don't attempt to read from PID File
if it doesn't exist
+ DEBUG in state file logic
+ DEBUG in pid file logic
+ proper startsWith logic for state detection
* Better state debugging and pid kill
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
* improve the formatting for precise ms in DateCache
* return original format string with DateCache.getFormatString
* calculate index in tick constructor because format strings can be different size
* use two ticks so that switching between seconds is less likely going to have cache miss
* use boolean instead of index to denote if sub second is needed
* remove formatWithoutCache and replace with doFormat as it doesn't work with sub second time
* allow the option of not having sub second precision
* use two separate formatters for the prefix/suffix around the SSS format code
* use a simple class to store both ticks in DateCache
* rename DateCache.Tick.getString(long) to format()
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
* Introduced module `threadpool-virtual` for Java 21.
* Updated virtual threads documentation to refer to Java 21.
* Updated requirements that the releases should use Java 21, so that the documentation can properly render the virtual threads documentation.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Removed references to deprecated properties `jetty.sslContext.[key|trust]StoreAbsolutePath`.
Updated documentation to explicitly report that the path can be absolute.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Made HttpChannel Dispatchable fields for REQUEST and ASYNC dispatches.
* Made AdaptiveExecutionStrategy implement Runnable to remove lambda/anonymous field.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
In an application with multiple Jetty instances in one JVM (e.g. integration test)
when examining stack frames using the debugger or profiler, most samples
that involve user code will have these two frames in their stack.
Unfortunately, with a lambda, the different Jetty instances actually have different class names
for different lambdas, which causes stack analysis to falsely think the frames are different.
It's a little uglier, but by replacing these two specific lambdas with anonymous classes with a stable name,
the profiler is able to see that the frames are in fact the same and collapse them, improving observability.
* Now that the migration of `https://eclipse.org/jetty/` to `https://eclipse.dev/jetty/` has occurred, it is time to review the URI use in our project
+ Updated URLs in poms
+ Added more URIs to XmlConfiguration
+ Updated URLs in module files
+ Updated URLs in documentation
+ Updated URLs in HTML
+ Correcting bad double-scheme URLs (eg: `http://https://www.eclipse...`)
+ Updating text in *.mod files
+ Removing `/current/` from path `/jetty/documentation/current/`
+ Fixing mailing list URL
---------
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
* Fixes#6184 - JEP-411 will deprecate/remove the SecurityManager from the JVM.
Removed usages of `SecurityManager` and `AccessControlller.doPrivileged()`.
In places where they are still necessary, now using reflection via newly introduced `SecurityUtils` class.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Introduced `QueuedThreadPool.maxEvictCount` to be the number of idle threads that are evicted in one idle timeout.
When set to 1 (the default), the old behavior is reproduced: expiring 1 thread every idle timeout.
When set to larger values, allows to keep around the threads for the idle timeout (in case of further load spikes), but allows to quickly recover OS memory when they are truly idle.
For example, with 2000 threads, 30 seconds idle timeout and idleTimeoutMaxShrinkCount=1, it will take 995 minutes (about 16.5 hrs) to shrink the pool back to 10 threads.
By setting idleTimeoutMaxShrinkCount=100, the thread pool can be shrunk to 10 threads in about 10 minutes.
Note also that the new algorithm is more aggressive at shrinking the thread pool.
Previously, a small load might have been sufficient to never evict any thread, because all threads could take turns at executing jobs so that threads were mostly idle but would never really idle time out.
The new algorithm is more aggressive even in presence of a small load, so that if `minThreads` are sufficient to cope with the small load, then the other threads are evicted.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: gregw <gregw@webtide.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: gregw <gregw@webtide.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
Cookie cleanup
+ New Cookie parser with clearer focus on RFC6265.
+ Better compliance modes for RFC2965
+ Introduced CookieParser interface so that old and new parsers can coexist and be selected by compliance mode.
---------
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>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
* Introduce HttpCompliance.MISMATCHED_AUTHORITY
* Update HttpCompliance.RFC2616
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
* Update NcsaRequestLogTest.testAbsolute
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
* Use RFC2616 mode in RFC2616 tests
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
* Alternative fix for mismatched host headers
This PR fixes the miss-matched host header issue in the Request.setMetaData method. This requires no change to the HttpParser.
A more comprehensive fix can be considered for jetty-12.
Signed-off-by: gregw <gregw@webtide.com>
* Alternative fix for mismatched host headers
Updates from review
Signed-off-by: gregw <gregw@webtide.com>
---------
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: gregw <gregw@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
* Wrong value of RequestDispatcher.FORWARD_CONTEXT_PATH on root context
* Fixes#9119 - uses proper context path that
satisfies the root context rules of the servlet
spec
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>