Commit Graph

786 Commits

Author SHA1 Message Date
Greg Wilkins cdf5035ab2
Various Cleanup in ServletChannel (#10064)
remove lambdas for clarity
 TODO Non-blocking error dispatch
 TODO isHandled does not exist
 TODO checkAndPrepareUpgrade and implement servlet upgrade?
 remove unused variables
 review javadoc (including any warnings)
 review any compiler or findbug warnings (if any)

---------

Signed-off-by: gregw <gregw@webtide.com>
2023-08-15 20:02:25 +10:00
Greg Wilkins 16b00e2a13
Allow better configuration of WebAppContext classloader (#10163)
* Allow better configuration of WebAppContext classloader

Moved the creation of a WebAppContext classloader into an extensible method.

* Allow better configuration of WebAppContext classloader

EE8/9 also

* Allow better configuration of WebAppContext classloader

Only close loader if context created it.
2023-08-11 11:24:46 +10:00
Joakim Erdfelt 9c324326c5
Merge `release/12.0.0` back into `jetty-12.0.x` (#10237)
* Updating to version 12.0.0

* Updating to version 12.0.1-SNAPSHOT
2023-08-08 00:55:19 +02:00
Simone Bordet b781a92517
Fixed javadocs generation.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-07 18:22:22 +02:00
Lachlan Roberts 466b75cec2 fix websocket demo for ee8 jetty-12
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-07 11:17:39 +10:00
Lachlan Roberts 1d52c83ae2 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-websocket-demos 2023-08-07 11:11:58 +10:00
Greg Wilkins 70a7a6769c
Fix #10229 servlet Idle Timeout (#10233)
* Fix #10229  Idle Timeout

Added test to reproduce

Fixed NPE if no failure listener


Possible

Added test that idle works between requests

EE9 idle timeout

idle if read operation

Handle idleTimeout for IO operations differently

improve comments

fixed test to not expect timeout listener to be called if there is demand

Idle timeouts for IO operations are not last.

Disable transient idle timeouts since AsyncContentProducer cannot handle them.

revert test to persistent idle failures
2023-08-07 06:05:05 +10:00
Joakim Erdfelt 5535179134
Issue #10231 - ee10 `DefaultServlet` HTTP method support. (#10232)
* Issue #10231 - ee10 & ee9 DefaultServlet HTTP method support.

+ HEAD support & testing
+ TRACE disabled & testing
+ OPTIONS support & testing
+ POST disabled & testing
2023-08-05 10:50:24 -05:00
Joakim Erdfelt 9357c263ca
Issue #10227 - `HttpServletResponse.addCookie(Cookie)` support for Cookie attributes (#10228)
* Issue #10227 - HttpServletResponse.addCookie(Cookie) support for Cookie attributes
2023-08-05 08:56:54 -05:00
Joakim Erdfelt 9ade07e4b1
Merge pull request #10180 from eclipse/fix/12.0.x/junit-beforeaftereach-public
Ensure @BeforeEach and @AfterEach are public methods (not protected)
2023-08-01 07:06:19 -05:00
Lachlan Roberts e3bbb0f718 fix websocket demo for ee8 jetty-12
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-01 11:48:09 +10:00
Lachlan Roberts a1e88f78a5 fix websocket demo for ee8 jetty-12
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-08-01 11:32:24 +10:00
Lachlan 55e107447b
Merge pull request #10165 from eclipse/jetty-12.0.x-javaxSourceRename
rename JAVAX_API to JAKARTA_API in ee9 and ee10 Source
2023-08-01 11:22:44 +10:00
Joakim Erdfelt fc37681cbb
Ensure @BeforeEach and @AfterEach are public methods (not protected) 2023-07-31 16:40:21 -05:00
Joakim Erdfelt f15e4a152f
Merge pull request #10179 from eclipse/fix/12.0.x/junit-test-syntax
Fix Junit usage issues
2023-07-31 16:33:34 -05:00
Joakim Erdfelt 4fe2b041c3
Merge pull request #10178 from eclipse/fix/12.0.x/spec-webapp-testing
Fix demo-spec webapp failures
2023-07-31 13:03:24 -05:00
Simone Bordet 8733746c66
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-31 19:31:57 +02:00
Joakim Erdfelt b6af685cd0
Ensure @Test methods are public 2023-07-31 11:42:33 -05:00
Joakim Erdfelt a157cf7cb8
Create IO.copyDir(Path, Path, CopyOptions...) and use it 2023-07-31 11:10:51 -05:00
Joakim Erdfelt c445784957
Fix demo-spec webapp failures 2023-07-31 10:59:34 -05:00
Simone Bordet e030aeefa6
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-31 17:01:49 +02:00
Lachlan bd7d504c28
Issue #10135 - fix empty binary frame from websocket flush (#10175)
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-07-31 15:21:12 +02:00
Lachlan Roberts 627f9f7321 fix additional javax references from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-07-31 12:15:41 +10:00
Lachlan Roberts 4e9c59cb78 rename JAVAX_API to JAKARTA_API in ee9 and ee10 Source
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-07-28 15:14:05 +10:00
Greg Wilkins 3d24929287
Fix #10155 include writer outputstream (#10157)
* Fix #10155 Include mixed writers and input streams

---------

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-07-27 18:28:29 +02:00
Ludovic Orban 4a8b517e58
Add extra DefaultServlet include tests (#10154)
#10142 Added extra DefaultServlet include tests

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: gregw <gregw@webtide.com>
2023-07-26 23:36:31 +02:00
Lachlan 7f8cb33518
Issue #10139 - DefaultServlet not working with named dispatch in Jetty-12 EE10 (#10140)
* Issue #10139 - check dispatch type and servlet name in DefaultServlet.isDefaultMapping

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #10139 - Two new test cases for INCLUDE/FORWARD to "default" named DefaultServlet

---------

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-07-26 15:02:08 +02:00
Joakim Erdfelt 453526845d
Issue #10141 and #10142 - Reintroduce context init-param `org.eclipse.jetty.servlet.Default.` prefix for ee10 (#10149)
+ Issue #10141 and #10142 - Reintroduce context init-param `org.eclipse.jetty.servlet.Default.` prefix for ee10
+ Fix named servlet lookup NPE in ee10 ServletHandler.getMappedServlet
+ Adding requested javadoc
2023-07-26 06:35:54 -05:00
Greg Wilkins da559d3ad8
Common code and documentation for dispatched query parameters (#10144)
Added comment explaining current behaviour with link to
https://github.com/jakartaee/servlet/issues/309
2023-07-26 10:52:01 +02:00
Joakim Erdfelt f134ed349e
Issue #10131 - Test case showing ERROR param merging works as-is. 2023-07-20 14:07:29 -05:00
Joakim Erdfelt 5d6173f776
Issue #10131 - More asserts in test case 2023-07-19 18:08:38 -05:00
Joakim Erdfelt 1e32e89d59
Issue #10131 - Adding test of request.getQueryString() to ErrorPageTest 2023-07-19 18:06:30 -05:00
Joakim Erdfelt 3ce1f5bd07
Issue #10131 - revert changes to ErrorRequest.getQueryString() and AsyncServletTest 2023-07-19 17:44:49 -05:00
Joakim Erdfelt 16f0a6e41c
Issue #10122 - Unable to use to error-page that is an HTML static file
* 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
2023-07-19 13:55:36 -05:00
Simone Bordet c19a5817f9
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-17 23:51:40 +02:00
Simone Bordet 0ef1845da6
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-17 11:08:25 +02:00
Simone Bordet 69e2f10521
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-07-16 12:01:43 +02:00
Joakim Erdfelt 8e52abe8c9
Merge `jetty-11.0.x` into `jetty-12.0.x` - July 14 (#10108)
* 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>
2023-07-14 20:21:11 -05:00
Ludovic Orban 248354f64a
Fixes #9910 - Inconsistent handling of welcome files
* 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>
2023-07-14 11:58:21 +02:00
Lachlan a317a1892d
Merge pull request #10106 from eclipse/jetty-12.0.x-asyncServletTest
increase timeouts in AsyncServletTest to make it less flaky + re-enable tests
2023-07-14 16:37:38 +10:00
Lachlan 993a111805
Merge pull request #10071 from eclipse/jetty-12.0.x-sizeLimitHandler
add SizeLimitHandler to Jetty-12
2023-07-14 16:37:02 +10:00
Lachlan Roberts 887528e575 increase timeouts in AsyncServletTest to make it less flaky
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-07-14 11:27:35 +10:00
gregw c435bfdbe6 Extra test for #10085 2023-07-12 14:38:44 +02:00
Greg Wilkins 0ee0716d33
Various cleanups of StringUtil and TypeUtil (#10082)
* Various cleanups of StringUtil and TypeUtil

Removed deprecated and unused methods
Moved charset handling to MimeTypes
resolve IDE warnings

* updates from review
2023-07-12 10:31:28 +02:00
Joakim Erdfelt c8fd1a198a
Issue #10084 - Directory results from `getResourcePaths(String)` should include trailing slash (#10085)
* Issue #10084 - Directory entries on return of getResourcePaths(String) should include trailing slash
* Issue #10084 - Fixing test case order of entries in collection expectation
* Issue #10084 - Implementing fix for ee9
* Issue #10084 - Fixing bug in ServletContext.getRealPath() impl
* Issue #10084 - Fixing tests in ee9 to make them compatible with ee8 conversion
* Bring Resource.getFileName in alignment with other JVM methods of the same name. (eg: Path.getFileName)
2023-07-11 11:39:23 -05:00
gregw 8d87a80410 Deflake test
better timeouts
2023-07-10 10:31:09 +02:00
Joakim Erdfelt 4ebdce078f
Merge pull request #10083 from eclipse/fix/12.0.x/dependency-rollup-july-2023
Dependency Updates for `jetty-12.0.x` - July 2023
2023-07-08 07:04:52 -05:00
Jan Bartel e22fbbf175
Fix configuration replacement (#10081)
* Fix configuration replacement
2023-07-08 09:36:56 +02:00
Joakim Erdfelt 81bc6d719a
Bump ee10 jakarta.websocket to 2.1.1 2023-07-07 12:33:07 -05:00
Lachlan Roberts 1c532e0db4 remove system.err.println used for debugging
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-07-07 19:47:15 +10:00