Fixed handling of Expirable.getExpireNanoTime() in case it returns Long.MAX_VALUE.
Also fixed implementations of Expirable that were not initializing their expireNanoTime field to Long.MAX_VALUE.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Cleaned up ErrorPageTest to ensure that behavior of one test is not impacting a different test
* Added test to replicate issue
* Fixing TODOs in Dispatcher$ErrorRequest
* Restoring original assertion on DispatcherTest.testDispatchMapping404
When `HttpChannelState._onIdleTimeout` was introduced, it was forgotten to null it out in recycle().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
The handling of reads in MultiPartByteRanges.PathContentSource was broken for ranges that were larger than the read buffer size.
Fixed by properly counting how many bytes are left to read.
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.
* Updating various old/moved URL references found across project (`jetty-10.0.x`) (#10098)
+ 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
+ Fixing github URL references in jsps
---------
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
* 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>
Using "strong quoting" with the single quote character to quote argument of --dry-run output.
Signed-off-by: gregw <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
* Added DefaultServlet combinations tests.
* Removed pathInfoOnly handling present in Jetty 11, because it is always true for mapping to "/", and always false for other mappings.
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
In case of `request.onComplete(Response.CompleteListener l)`, only the complete event should be delivered to `l`, not all the events (in case `l` implements other listener interfaces).
Only `Response.CompleteListener` passed to `request.send(Response.CompleteListener)` should receive all events.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Fixes#10087 - Flaky EventsHandlerTest due to trailers.
HTTP/2 trailers may arrive and be processed before the application reads request chunks.
Avoid the race condition by storing the trailers aside and returning them during reads.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>