Commit Graph

29804 Commits

Author SHA1 Message Date
Jan Bartel 5dc9a73970
Jetty 12.1.x move demos (#11836)
* Refactor all ee demos to remove duplicates
2024-05-28 07:59:10 +02:00
Jan Bartel 810eccaeea Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.1.x 2024-05-28 10:23:00 +10:00
Jan Bartel c50d325dfc
Issue #11813 add tests for no-ops on Response after commit. (#11824)
* Issue #11813 add tests for no-ops on Response after commit.

* Change after review
2024-05-28 02:06:12 +02:00
Greg Wilkins 7e36f3c6e9
Fix #11507 getAttribute javadoc (#11843)
Fix #11507 getAttribute javadoc.
As some stage we should consider @Nullable or @NotNull annotations...
2024-05-28 08:06:06 +10:00
Simone Bordet e782f91ef2 Fixes #1470 - Replace Timer use with Jetty Scheduler.
Removed usages of the Timer class.

Deprecated TimerScheduler.

Code cleanup in ee10 classes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-27 22:38:17 +02:00
Simone Bordet 65a016d1aa Fixes #11778 - jetty-http-spi does not properly provide SPI for modules.
Fixed all module-info.java files that did not have a "provides" declaration but had META-INF/services files.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-27 11:05:48 +02:00
Lachlan f7e502b579
Merge pull request #11828 from jetty/jetty-12.1.x-websocket-HttpSessionTest
add test for HttpSession.Accessor with WebSocket
2024-05-27 11:26:53 +10:00
Greg Wilkins a84f99b1e6
Fix #11815 HttpServletMapping (#11829)
Implemented a test that uses the examples from the javadoc
Fixed the matchValue for PREFIX matches
2024-05-25 10:35:43 +10:00
Olivier Lamy b16460252f
Disable cache antora as it looks to have some bugs with forking lifecycle (#11835)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-05-23 23:31:30 +02:00
Simone Bordet be7491e13a Sometimes it happens that some process is listening to `connector.getLocalPort() + 1`, making this test fail.
Now using a non-allocated privileged port from IANA, that nobody should listen to, so the test should not fail.
It is not a 100% guarantee, but perhaps better than before, especially because now a port < 1024 is used.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-23 22:06:46 +02:00
Simone Bordet 36cdc12ab7 Fixed JPMS declarations.
Some require transitive was missing, and has been added.
In other cases, making a field private (e.g. for log instances) made the warning go away.
In another case, removed explicit dependency on websocket core exception, as it was not necessary.

Clean up the POMs for jetty-eeN-annotations, that had unnecessary dependencies.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-23 22:06:01 +02:00
Greg Wilkins 1e95caa1ef
Implement Servlet 6.1 Error dispatch changes (#11821)
Implement Servlet 6.1 Error dispatch changes

+ Error dispatches are done as GET methods
+ New ERROR_METHOD and ERROR_QUERY_STRING attributes
+ Moved most error attributes to Dispatcher.ErrorRequest
+ removed duplicate attributes

* updates from review

* Update jetty-ee11/jetty-ee11-servlet/src/main/java/org/eclipse/jetty/ee11/servlet/ErrorHandler.java

Co-authored-by: Jan Bartel <janb@webtide.com>
2024-05-23 14:49:00 +10:00
Greg Wilkins 456fd8020a
removed unused resources (#11830) 2024-05-23 14:48:32 +10:00
gregw c10df2d7ab remove more system/server classes from ee11 2024-05-23 11:51:25 +10:00
gregw 088788e086 remove more system/server classes from ee11 2024-05-23 11:37:05 +10:00
Jan Bartel e0066a48ba
Issue #11791 fix suffix mapping for non default DefaultServlet usage. (#11799)
* Issue #11791 fix suffix mapping for non default DefaultServlet usage.

Co-authored-by: Greg Wilkins <gregw@webtide.com>
2024-05-23 03:34:50 +02:00
gregw 24335af115 merged ee10 to ee11 2024-05-23 10:56:27 +10:00
gregw 0e5bc9d57d merged ee10 to ee11 2024-05-23 10:27:49 +10:00
Jan Bartel 7272937df0 Fix version on new documentation poms 2024-05-23 09:41:47 +10:00
Greg Wilkins eafa7ab0d6
Fix #11756 empty byte array for no content in ChunkAccumulator (#11827)
Fix #11756 empty byte array for no content in ChunkAccumulator
2024-05-23 06:45:27 +10:00
Greg Wilkins 10d0898460
Fix #11811 insensitive header name set (#11823)
* Fix #11811 insensitive header name set

Fix #11811 insensitive header name set by:
 + Using a EnumSet and TreeSet to ensure no duplicates in the set
 + Using an ArrayList to preserve the ordering (not necessary, but useful).

* updates from review
2024-05-23 06:42:01 +10:00
Ludovic Orban 07991f41d3
Allow ContentListener and AsyncContentListener to throw Exception (#11825)
#11800 allow ContentListener and AsyncContentListener to throw Exception

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-05-22 09:28:16 +02:00
gregw f684b69977 Merge branch 'jetty-12.0.x' into jetty-12.1.x 2024-05-22 15:42:00 +10:00
Lachlan Roberts 548ed9a08e add test for invaliding the session from WebSocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-05-22 12:19:16 +10:00
Lachlan Roberts 253eeb92b0 add test for HttpSession.Accessor with WebSocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-05-22 11:38:13 +10:00
Greg Wilkins 1b82757854
Fix Deprecated ClassMatcher #11767 (#11769)
Fix #11767 by making deprecated ClassMatcher class wrap the util ClassMatcher

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2024-05-21 10:42:33 +10:00
Greg Wilkins a1b3acb08a
Fixed header cache for unknown values (#11808)
Avoid adding the unknown marker into the CACHE index. Issue introduced in #11661 fixing #11659
2024-05-21 10:40:43 +10:00
Simone Bordet a57001530b
Merged branch 'jetty-12.0.x' into 'jetty-12.1.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-21 00:39:34 +02:00
Dan Allen 00f322f092 migrate documentation to Antora 2024-05-21 00:37:51 +02:00
Simone Bordet c069897274
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-21 00:37:06 +02:00
Dan Allen 3c6379b496 migrate documentation to Antora 2024-05-21 00:27:16 +02:00
Simone Bordet ac47ae8d22
Merged branch 'jetty-12.0.x' into 'jetty-12.1.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-20 22:58:06 +02:00
Greg Wilkins 4c1c6a2652
Implemented servlet 6.1 redirect with content (#11743)
* Implemented servlet 6.1 redirect with content

Added option for server to generate a short html redirect body content, as per RFC9110 (default false)
Allowed an aggregated servlet response content to be used if clear is false.

* Redirect is a noop in include

* Fixed init order

This style of extensibility (calling virtuals from constructors) is very fragile.

* Update javadoc from review

Also update EE10 to also noop included response methods

* Update javadoc from review

Also update EE10 to also noop included response methods

* Update javadoc from review

Also update EE10 to also noop included response methods

* Update jetty-ee11/jetty-ee11-servlet/src/main/java/org/eclipse/jetty/ee11/servlet/ServletApiResponse.java

Co-authored-by: Jan Bartel <janb@webtide.com>

* Updating ee11 jsp-impl to 11.0.0-M19

* Updates from review

* updates from review

* Update jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java

Co-authored-by: Simone Bordet <simone.bordet@gmail.com>

---------

Co-authored-by: Jan Bartel <janb@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-20 23:20:24 +10:00
Simone Bordet a4c297011b
Fixes #11072 - Jetty 12: CompleteCallbackHandler (#11786)
Introduced StateTrackingHandler.

StateTrackingHandler is a troubleshooting Handler that helps to identify those cases where the Handler/Request/Response APIs are used improperly.

In particular, it tracks the events described in StateTrackingHandler.Listener, such as the Handler callback not completed, or blocking demand callback, or a write callback not completed, etc.

It also provides dump() capabilities, so the current requests and their state is dumped to help troubleshooting.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-19 19:32:37 +02:00
Ludovic Orban c97c995642
Don't create circular throwables and don't throw StackOverflowError if one gets logged (#11793)
#11792 detect loops in throwables to avoid StackOverflowError

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-05-17 11:39:01 +02:00
Simone Bordet 66b13d5df1
Updated XML example to use ${project.basedir} instead of ${basedir}.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-16 19:04:48 +02:00
gregw 22ddb6db77 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.1.x 2024-05-16 17:28:29 +10:00
gregw 09f3adc66c Cleanup many warnings from ee10 and ee11 servlet 2024-05-16 17:04:13 +10:00
Jan Bartel 7f1823e689 Fix untranslatable static var name. 2024-05-16 14:26:31 +10:00
Simone Bordet a9b2da533f
Fixes #11763 - Race condition in QoSHandler. (#11772)
* Fixes #11763 - Race condition in QoSHandler.

Now using a read-write lock to atomically execute expire().
This guarantees that there are no races with resume().

The concurrency between handle() and resume(), which should be the most common case, is handled by atomic data structures.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-14 10:37:00 +02:00
Ludovic Orban 33bc4f7376 #11777 change Index to allow null string keys to avoid having to add null checks
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-05-14 09:37:08 +02:00
Joakim Erdfelt 9160108b6b Issue #11776 - NPE proteection in Request.getServerPort
If the HttpURI is scheme-less, the attempt to get the port can result in a NPE
2024-05-14 09:37:08 +02:00
Ludovic Orban c54141a4cb #11736 do not rethrow already thrown exception
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-05-13 12:05:10 +02:00
Olivier Lamy 980576d6cb
build cache 1.2.0 (#11783)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-05-13 10:29:59 +02:00
Simone Bordet ceaaa9167c HTTP/2 parser improvements.
Refactored length checks so that they are mostly performed once, rather than multiple times, during parsing.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-13 09:32:10 +02:00
Simone Bordet e8dd649520
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-13 09:28:09 +02:00
Simone Bordet ab3c6e91e3
Merged branch 'jetty-10.0.x' into 'jetty-11.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-05-13 09:16:17 +02:00
Sheldon Shao 1995b5ea59
HttpExchange/HttpRequest got retained by HttpSenderOverHTTP (#11782) 2024-05-13 09:14:55 +02:00
Jan Bartel 6f2f599b17
Issue #11761 fix jetty maven doco and integration test (#11771)
* Issue #11761 fix jetty maven doco and integration test
2024-05-13 01:44:13 +02:00
Joakim Erdfelt dd611b4e79
Merge pull request #11775 from jetty/fix/12.0.x/readlistener-nullification
Issue #11766 - null out ReadListener on recycle to aid GC.
2024-05-12 14:30:07 +00:00