Commit Graph

758 Commits

Author SHA1 Message Date
Lachlan Roberts d005e975b0 changes f rom review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-02-07 15:47:17 +11:00
Greg Wilkins 461c306fcf cleanup TODOs for decoration
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2023-02-07 07:46:03 +11:00
Simone Bordet 5cc07994c0
Issue #9300 - Rename RetainableByteBufferPool to ByteBufferPool
ArrayRetainableByteBufferPool -> ArrayByteBufferPool.
Updated field names.
Updates tests.
Updated *.mod files to not reference RetainableByteBufferPool.
Updated javadocs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-02-06 10:31:14 +01:00
Simone Bordet 44980ebfc3
Merge branch 'issue/9284' of https://github.com/kohlschuetter/jetty.project into kohlschuetter-issue/9284 2023-02-06 10:16:32 +01:00
Greg Wilkins d5866d3521 Removed TODOs that will not be done. 2023-02-06 17:05:01 +11:00
Greg Wilkins 60a08f5349
Rename Handler Nested & Collection (#9305)
There is now a Handler interface hierarchy:
 + Container is a Handler that has 1 or more contained Handlers.
 + Wrapper is a Container with only 1 handler and a setHandler method.
 + Collection is a Container with n handlers and a addHandler method

class are now:
 + Abstract implements Handler
 + AbstractContainer extends Abstract implements Container
 + BaseWrapper extends AbstractContainer implements Wrapper
 + Sequence extends AbstractContainer implements Collection

 Lots of other associated cleanups
2023-02-06 12:15:35 +11:00
Lachlan Roberts c7e7fd837c Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-multipartCleanups 2023-02-06 11:18:19 +11:00
Olivier Lamy 4812eb1c89
Merge branch 'jetty-11.0.x' into jetty-12.0.x-merg 2023-02-05 16:34:58 +10:00
dependabot[bot] 44cd3ee541
Bump maven.surefire.plugin.version from 3.0.0-M5 to 3.0.0-M8 (#9255) 2023-02-05 15:58:03 +10:00
Christian Kohlschütter b8ab66fd1d Rename RetainableByteBufferPool to ByteBufferPool
With issue #9166, ByteBufferPool was removed and replaced by
RetainableByteBufferPool. Since ByteBufferPool was used by
AbstractConnector, this change broke backwards compatibility with
third-party connectors such as junixsocket-jetty.

Since there's no longer any other ByteBufferPool, rename the
RetainableByteBufferPool interface, and thereby not only reinstate
compatibility with existing third-party libraries but also save a few
keystrokes.

https://github.com/eclipse/jetty.project/issues/9284

Signed-off-by: Christian Kohlschütter <christian@kohlschutter.com>
2023-02-04 23:39:29 +01:00
Simone Bordet 55a27fc68c
Issue #9293 - Jetty 12 - Relax JPMS dependencies. (#9296)
Relaxed jetty-http2 and submodules JPMS dependencies.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-02-03 10:19:41 +01:00
Olivier Lamy b93a115ecd
Jetty 12 - Rename sessions tests with ee# version in package name (#9231)
* rename sessions tests with eeX version in package name as it, we can indentify which test is failing with junit result
* get rid of some duplicate classes

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-02-03 10:49:44 +10:00
Greg Wilkins ebc6cca478
Jetty 12 - Added a core Session abstraction (#9223)
* Added a core Session abstraction

Sessions were already a core mechanism, but there was no API for them.
There is now a new Session interface that is available via the Request API.  It is intended only for users of sessions.
The previous concrete class Session has been renamed to ManagedSession and it is used by classes that extend AbstractSessionManager.

* Fixed tests

* Use static method

* Updates from review

* Updates from review

Improved javadoc
used util Attributes interface.
2023-02-02 21:40:17 +11:00
Joakim Erdfelt 490f86e9a6
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-02-01 19:33:43 -06:00
Jan Bartel 7e67e33d3c
Jetty 12.0.x reenable jetty ee9 tests (#9224)
* Restore tests in ee9
2023-02-01 15:04:35 +11:00
Lachlan Roberts 4ffad09335 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-9066-MultiPart-getParameters 2023-02-01 12:42:35 +11:00
Greg Wilkins 50a88187fa
Jetty 12 - New HTTP Cookie interface (#9205)
Convert HttpCookie to an interface.
2023-01-31 10:02:28 +11:00
Joakim Erdfelt f80ae9a96e
Bump versions.maven.plugin.version to 2.14.2 2023-01-30 13:55:12 -06:00
Simone Bordet 4d7c38f3eb
Fixed dependency management in jetty-ee9-test-sessions and jetty-ee10-test-sessions.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-30 17:38:59 +01:00
Simone Bordet 59e55ce3aa
Merge pull request #9220 from eclipse/fix/jetty-12-reorganize-session-tests
Jetty 12 reorganized session tests.
2023-01-30 16:53:23 +01:00
Simone Bordet 2e0df218a6
Restored property removed by mistake.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-30 16:52:24 +01:00
Olivier Lamy b0e50748c1
keep matching exception to found errorpage (#9090)
* [TCK] if any matching error page we keep the exception matching the error page found

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-01-28 11:08:52 +10:00
Simone Bordet 7b7cb67cb0
Moved jetty-ee9/test-ee9-sessions to jetty-ee9-tests/jetty-ee9-test-sessions.
Renamed all child modules to comply with the convention.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-27 20:14:38 +01:00
Simone Bordet cd732a175c
Review and normalized all Maven module <name> for consistency.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-27 19:09:30 +01:00
Ludovic Orban 12deee847d #9145 re-enable DynamicListenerTests
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-01-27 17:44:09 +01:00
Ludovic Orban 2424c86b34 #9145 fix websocket modules
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-01-27 17:44:09 +01:00
Simone Bordet ded18f523d
Fixes #9166 - Jetty 12: review/remove ByteBufferPool (#9195)
* Fixes #9166 - Jetty 12: review/remove ByteBufferPool

* Replaced usages of ByteBufferPool with RetainableByteBufferPool.
* Removed ByteBufferPool and related classes.
* Renamed oej.http2.frames.DataFrame.getData() -> getByteBuffer() for consistency.
* Removed Accumulator.acquire(), and updated code to use RetainableByteBufferPool.acquire() instead.
* Fixed HttpOutput callbacks to correctly call super.onCompleteSuccess() and super.onCompleteFailure().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-27 13:40:49 +01:00
Joakim Erdfelt 63d963d526
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-01-26 14:47:19 -06:00
Jan Bartel e271629cfc
Ensure all eeX versions of the plugin use prefix "jetty" (#9156) 2023-01-25 17:36:25 +11:00
Lachlan Roberts 36e7f71def Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-9066-MultiPart-getParameters 2023-01-25 14:23:37 +11:00
Lachlan Roberts d4682f4b85 Fix testMaxRequest size test in MultiPartServletTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-01-25 10:39:20 +11:00
Greg Wilkins 39e5667f1d
Jetty-12 Remove usage of HandlerList and reduce usage of Handler.Collection (#9191)
* Remove usage of HandlerList and reduce usage of Handler.Collection

"The best part is no part" - Elon Musk!

The overwhelming usage of `HandlerList` and `Handler.Collection` was for adding the `DefaultHandler` after the main handler.  This PR adds a getter/setter for a `DefaultHandler` on the server, so we no longer need to always create a `Handler.Collection` structure.   This has allowed the deprecated `HandlerList` and `HandlerWrapper` classes to be removed.

In implementing this PR, several problems were found in the calculation of `InvocationType`, not least that it was assumed that an empty `Handler.Collection` was `BLOCKING`.  When this issue was fixed, any dynamic addition of contexts (deployer or SPI server) failed as the `InvocationType` changed.  So this PR also introduces the `isDynamic()` attribute of all `Handler.Container`s.  A dynamic container will always return `BLOCKING` from `getInvocationType()`, as there is always a race with a new handler being added.   A non-dynamic container will return a real `InvocationType`, calculated from its children, but it's mutator methods will ISE if contained handlers are changed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Jan Bartel <janb@webtide.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-25 08:08:09 +11:00
Jan Bartel ad344c7d23
Uncomment websocket deps for ee9 jetty maven plugin (#9189)
* Uncomment websocket deps for ee9 jetty maven plugin

* Update jetty-ee8-maven-plugin pom
2023-01-24 18:22:35 +11:00
Greg Wilkins 99fdd219b7
Jetty 12.0.x 9131 remove path watcher (#9158)
* Reverted to Scanner for PropertyUserStore
* Remove PathWatcher from unassembled fork mode.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Jan Bartel <janb@webtide.com>
2023-01-20 08:03:27 +11:00
Greg Poulos 06efbcaa7c
Jetty 12.0.x document modules (#9151)
* Add documentation in "Standard Modules" section for the jmx module
* Add documentation in "Standard Modules" section for the ee8,9,10-webapp modules
* Use shorter markup tags to transclude documentation from .mod files
* Extract EE version strings into variables
* Replace literal usages of EE version numbers with custom attribute
* Use convention 'eeN' instead of 'eex' in filenames
* Update metadata tag for deploy module documentation
* Update deploy module documentation to discuss EE platform-specific deploy modules
* Add documentation for the resources module
* Add resources module into section table of contents
* Use jetty-home instead of JETTY_HOME as documentation attribute

Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-19 19:02:42 +01:00
Joakim Erdfelt a37b8523e5
Jetty 12 - Javadoc cleanup & new inspection profile (#9165)
* Adding intellij-javadoc-inspection.xml for Jetty specific Javadoc inspection profile.
* Javadoc cleanup
2023-01-19 10:31:27 -06:00
Simone Bordet 0a002d7785
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-19 15:23:13 +01:00
Jan Bartel 7005300421 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-01-18 10:24:39 +11:00
Lachlan Roberts 539113df7c Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-9066-MultiPart-getParameters 2023-01-17 15:12:38 +11:00
Greg Wilkins 94991c60c0
Jetty 12 temp directory cleanup (#9153)
+ `Server` now has setter/getter for a temp directory, which can be null
 + `Context` now has a getter for a temp directory, which is never null 
 + Server root Context temp directory is either whatever is set, else a work directory, else java.io.tmpdir
 + WebInfConfiguration will still create a temp directory name, but defers to ContextHandler for creation/persistence of the temp directory
 + temp directory (and BASE) removed from the deployer, as it is now the server temp directory.
2023-01-17 11:44:09 +11:00
Olivier Lamy 58f5e468fc
jetty 12.0.x cleanup duplicate osgi pom metadata (#9093)
* fix naming convention, artifactId == directtory, add comment on maven-eclipse-plugin
* cleanup dependencies from jetty-ee9 osgi
* cleanup dependencies from jetty-ee10 osgi
* remove maven-eclipse-plugin configuration
Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-01-16 11:39:37 +10:00
Greg Wilkins 8b3bcc3a50
Cleanup non-retainable `Retainable`s (#9159)
`Retainable`s that return false from `canRetain()` now are noops if `retain()` is called, which allows for a simpler calling convention.
`AsyncContent` has also been reworked to allocate less and be clearer in its use of `canRetain()`.
2023-01-13 10:37:16 +01:00
Simone Bordet 46355c6110
Fixes retainability of special Chunks (#9073)
* Fixes #8993 - Retainability of special Chunks

* Restored Jetty 11's AsyncContentProducer and related classes in jetty-ee9-nested module (src and test).
* Introduced Retainable.canRetain().
* Removed Chunk.isTerminal() and replaced it with alternative method calls.
* Clarified AsyncContent.write() in case of Chunk.Error.
* Removed AsyncContent.write(Chunk, Callback) because it was making the API confusing.
  For example, AsyncContent.close() clashing with write(EOF, NOOP), or
  AsyncContent.fail(x) clashing with write(Chunk.Error, NOOP), etc.
* Improved usage of Chunk.from(..., Retainable).
* Improved usage of Chunk.slice().
* Using from() in MultiPart, rather than duplicating code.
* Fixed MultiPart.Parser.Listener.onPartContent() javadocs.
* Renamed non-retaining Chunk.from() to Chunk.asChunk().
* Removed Chunk.slice() methods, inlining them where necessary.
* Carefully reviewed all usages of read()-like methods that return a Retainable instance to make sure it is released.
* Updated HTTP/2 and HTTP/3 usages of Stream.Data to follow the correct retain/release semantic.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-13 01:10:56 +01:00
Lachlan Roberts 02f9cc0eb3 fixes to pass new multipart test cases
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-01-12 19:21:00 +11:00
Lachlan Roberts 1ff251c9b3 add more tests for multipart
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-01-12 19:20:33 +11:00
Simone Bordet a1c5cefd0d
Reorganization of jetty-client classes. (#9127)
* Reorganization of jetty-client classes.

* Moved oej.client.api to oej.client
* Moved oej.client.util to oej.client
* Moved implementation classes to oej.client.internal
* Moved transports to oej.client.transport
* Moved transport implementation classes to oej.client.transport.internal
* Moved TunnelRequest to oej.client.internal.

* Moved FastCGI transport classes to o.e.j.fcgi.transport
* Moved FastCGI transport implementation classes to o.e.j.fcgi.transport.internal

* Updated WebSocket core client to use only exported, non-internal, oej.client classes.

* Expanded oej.client.Destination APIs:
  - added: getOrigin(), isSecure(), getProxy(), getConnectionPool(), getHttpClient(), send(..).
  - removed: getScheme(), getHost(), getPort() because they don't uniquely identify a Destination anymore (Origin does)
* Moved destination sweeper functionality from HttpDestination to HttpClient.
  HttpDestination does not implement close() anymore, now relies on LifeCycle.stop()
* Moved HttpReceiver.storeCookie() logic to HttpClient.putCookie() to avoid exposing CookieManager.
* Moved HttpClient.getAcceptEncodingField() to ContentDecoder.Factories

* Avoid public/protected Logger instances.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-11 10:05:43 +01:00
Ludovic Orban fcbdab8b3e
Rework client content listeners (#8981)
* Removed DemandedContentListener
* Updated AsyncContentListener signature
* Updated documentation

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-01-04 11:01:18 +01:00
Olivier Lamy f3d3e0349d
Merge branch 'jetty-11.0.x' into jetty-12.0.x 2022-12-29 17:40:36 +10:00
Olivier Lamy 082e972793
fix missing merging both classes (#9091)
use separate package name to be able to understand which test fail in Jenkins
Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-12-27 09:05:36 +10:00
Olivier Lamy 56af845cf1
Merge branch 'jetty-11.0.x' into jetty-12.0.x 2022-12-26 09:31:36 +10:00
Lachlan 0e95953be3
Merge pull request #9043 from eclipse/jetty-12.0.x-httpcontentFactoryCleanup
Create StaticHttpContentFactory and other cleanups
2022-12-23 22:54:38 +11:00
Jan Bartel 1abaeb6cee
Jetty 12.0.x osgi (#9068) 2022-12-21 08:12:44 -06:00
Olivier Lamy 964e44527d fix package change with new groovy 4.x version
Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-12-21 22:04:00 +10:00
Greg Wilkins c18e790858
Jetty 12 handler as boolean processor (#9035)
Alternative Handler architecture.

All Handlers are Processors, which now return a boolean to indicate the request has been accepted.
The request/response/callback are no longer modal, so there is no race with the boolean return.

Optimized PathMappings.
Avoid iterations if only ServletPathSpec instances
Avoid tests for empty mappings.
Better reset implementation
Improve suffix matching
Improve exact matching

Renamed HttpStream.getNanoTimeStamp() to getNanoTime().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2022-12-19 16:02:26 +01:00
Lachlan Roberts 06f9e5ec18 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-httpcontentFactoryCleanup 2022-12-19 21:46:05 +11:00
Jan Bartel dc49639444 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-12-19 10:11:49 +11:00
Lachlan Roberts 0f1420fbd7 changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-12-16 17:17:12 +11:00
Jan Bartel f139b66d63
Issue #9046 Fix tck session invalidate test (#9047) 2022-12-14 08:25:52 +11:00
Lachlan Roberts 9270e62f78 rename of StaticHttpContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-12-13 10:44:35 +11:00
Lachlan Roberts abc40afd89 cleanups for HttpContent Factories
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-12-13 09:55:55 +11:00
Olivier Lamy 139d3f2a41
response#getWriter should throw UnsupportedEncodingException in case of bad character encoding used (#9037)
* response#getWriter should throw UnsupportedEncodingException in case of bad character encoding used

Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-12-13 08:47:52 +10:00
Simone Bordet 119996c16f
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-12-07 19:28:05 +01:00
Joakim Erdfelt 2d9c735d63
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-12-06 14:38:53 -06:00
Greg Wilkins e682f73d54
Cleanup of TypeUtil and ContextHandler stop/start (#8998)
* Extracted some non controversial cleanups from another mega PR:

 + TypeUtil class shortname used more often and includes trailing digits
 + Fixed direct stopping/starting of a nested ContextHandler
 + Fixed null path handling in nested context
 + more tests for all of the above

* Extracted some non controversial cleanups from another mega PR:

Fixed nested doStart and doStop

* Extracted some non controversial cleanups from another mega PR:

Fixed DistributionTests
2022-12-06 15:43:31 +11:00
Jan Bartel 91c7a51cbc
Issue #8921 Fix normalization of META-INF resources for quickstart (#8922)
* Issue #8921 Fix normalization of META-INF resources for quickstart
2022-12-06 08:51:44 +11:00
Greg Wilkins f59eaa58c9
Fix #8980 addJars to WebAppClassLoader (#8982)
List of resources is a list of resources, not a combined resource.
2022-12-01 15:08:13 +11:00
Greg Wilkins 011a7267de
Cleanup ContextHandler (#8928)
* Cleanup ContextHandler

Extracted some of the goodness from #8793:
 + Clear enter/exit scope methods rather than opaque suppliers and Runnables
 + Removed overloading of "Context" class name to avoid accidental usage of wrong type.
 + Less holding onto request/response as fields

* Cleanup ContextHandler

fixed test with no server

* Updates from review.
2022-11-25 14:27:39 +11:00
Greg Wilkins 2460b86d41
Jetty 12 recycle servlet channel (#8909)
Recycle ServletChannel 
Cleanup caching comments and impl
Don't recycle after completion notification
Delay setting callback until ServletHandler.handle called
Check that the retrieved ServletChannel is for the same context.
2022-11-24 13:56:43 +11:00
Jan Bartel c4e1db57ee Issue #8460 simplify DefaultSessionIdManager start (#8464)
* Issue #8460 check DefaultSessionIdManager is started
2022-11-24 09:43:57 +11:00
Greg Wilkins a44af984b5
Jetty 12 mimetype cleanup (#8919)
MimeTypes now available via context.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-11-23 14:30:11 +11:00
Joakim Erdfelt b7d7e53ac7
Merge pull request #8924 from eclipse/fix/jetty-12-fileid-getextension-jdk-20
Jetty 12 - Align `FileID.getExtension()` with JDK20 behaviors
2022-11-22 08:24:03 -06:00
Jan Bartel 07202102b8
Jetty 12 - Re-enable some disabled session tests. (#8714)
* Re-enable some disabled session tests.

* Add needed test resources to ee8 jdbc session test.
2022-11-22 17:25:06 +11:00
Joakim Erdfelt 95e149b236
Issue #8923 - Fixing WebAppClassLoader expectations 2022-11-21 16:20:27 -06:00
Greg Wilkins 11fdbbef02 Fixed switch statement style and format 2022-11-22 09:16:08 +11:00
Simone Bordet 71e0414cbc
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-11-21 15:52:11 +01:00
Simone Bordet e7f6f6729a
Restored server push functionality. (#8760)
* Restored server push functionality.

* Moved Request.isPushSupported() to ConnectionMetaData.
* Removed HttpStream.isPushSupported().
* Implemented ee10 PushBuilder.
* Moved PushCacheFilterTest from core to ee10.
* Duplicated PushCacheFilterTest to ee9.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Greg Wilkins <gregw@webtide.com>
2022-11-21 12:18:19 +01:00
Jan Bartel 9cb6cc62d5 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-11-21 13:15:27 +11:00
Joakim Erdfelt 18f22816c9
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-11-17 13:01:00 -06:00
Greg Wilkins f7d8ea67f6 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
# Conflicts:
#	jetty-ee9/jetty-ee9-nested/src/main/java/org/eclipse/jetty/ee9/nested/ResourceService.java
#	jetty-server/src/test/java/org/eclipse/jetty/server/handler/ResourceHandlerTest.java
2022-11-17 13:01:45 +11:00
Simone Bordet ec690e2809
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-11-16 22:04:35 +01:00
Simone Bordet da67879cf1
Fixed inconsistencies in naming for styleSheet.
Some classes had the second S capitalized, some did not, so now stylesheel -> styleSheet.

CSS has 2 "S" for "S"tyle"S"heet.
Also, the DOM API and the Swing API have "StyleSheet".

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-11-16 12:18:23 +01:00
Lachlan d72e39757d
Merge pull request #8767 from eclipse/jetty-12.0.x-HttpContent-Caching-Refactor
Refactor and improvements to HttpContent Factories
2022-11-16 12:42:32 +11:00
Lachlan Roberts eff404cf7d Re-enable and fix StatisticsServletTest for ee9
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-14 09:37:26 +11:00
Joakim Erdfelt a636a7d153
Adding some more test tags 2022-11-10 10:14:58 -06:00
Lachlan Roberts 126658145c remove setter for HttpContentFactory on ResourceHandler
revert to using computeIfAbsent on CachingHttpContentFactory
make direct buffers configurable on CachingHttpContentFactory

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-11 00:49:55 +11:00
Lachlan Roberts bff3c83726 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-11-10 17:38:46 +11:00
Lachlan Roberts 7cccd9629f Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-11-10 17:05:00 +11:00
Lachlan Roberts eeb4df9965 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-HttpContent-Caching-Refactor 2022-11-10 16:20:30 +11:00
Lachlan Roberts 1c6d36e44a changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-10 16:16:51 +11:00
Joakim Erdfelt 08c47f5f57
Jetty 12 - use JVM provided null OutputStream (#8789)
* Remove IO.getNull* methods and use JVM versions

+ This also honors the open/close/error on
  bad use of the streams/writers
2022-11-09 07:06:43 -06:00
Simone Bordet e2e4d256e7
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-11-09 12:23:27 +01:00
Lachlan Roberts 5fec1801f5 add getters and setters for HttpContentFactory onto ResourceHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-09 14:20:52 +11:00
Lachlan Roberts a4e773a7ab changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-09 14:10:49 +11:00
Joakim Erdfelt aa9df2a402
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-11-08 18:16:45 -06:00
Simone Bordet bb3355be83
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-11-08 22:26:39 +01:00
Lachlan Roberts 75f210d20b Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-HttpContent-Caching-Refactor 2022-11-08 21:22:53 +11:00
Simone Bordet 4225544222
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-11-07 19:34:43 +01:00
Joakim Erdfelt b3505ae687
Jetty 12 - General cleanup of URIUtil (#8861)
+ Removal of __CHARSET
+ Removal of unused methods
+ Using new switch/case concepts
+ cleanup of URIUtil constants
+ cleanup of URIUtil methods
+ collapse separate methods
+ simplify encodePath()
* Javadoc updates
* equalsIgnoreEncoding cleanup (no longer used by Resource layer)
2022-11-04 14:28:53 -05:00
Lachlan Roberts c0bb0272f7 fix release in CachingHttpContentFactory and always use ByteBufferPool
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-03 17:38:22 +11:00
Lachlan Roberts 6facedba75 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-HttpContent-Caching-Refactor 2022-11-02 17:28:42 +11:00
Lachlan Roberts e28a528165 changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-11-02 17:21:44 +11:00
Greg Wilkins 976ab3df8d
ResourceCollection should not have a path (#8711)
ResourceCollection should not have a path
Nor name, nor filename unless all resources agree on it.
revert combine and related methods to return Resource and not explicitly a ResourceCollection, as if there is only 1, then a collection is not needed
cleanup ResourceCollection creation. Avoid sanity checks on resolved resources.
2022-11-01 15:54:50 +11:00
Greg Wilkins 3b2d4048fd replaced getPathInContext with static method
updates from review
2022-10-25 21:11:10 +11:00
Greg Wilkins 9dc9eaa711 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12-static-pathInContext 2022-10-25 20:42:25 +11:00
Gili Tzabari 0724d1090d
Fixes #8723: Provide a thread-safe way to modify HttpClient proxies at runtime. 2022-10-25 10:23:04 +02:00
Lachlan Roberts 7752720861 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-HttpContent-Caching-Refactor 2022-10-25 16:44:53 +11:00
Lachlan Roberts 02e0a3993c cannot add ContentFactory to servletContext attribute as there may be multiple factories in a single context
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-25 16:39:42 +11:00
Greg Wilkins 6c9d34c26a Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12-static-pathInContext
# Conflicts:
#	jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/DefaultServlet.java
2022-10-25 09:11:40 +11:00
Simone Bordet 660093ff3a
Code cleanups.
Removed obsolete oej.server.HttpTransport.
Cleaned up ConnectionMetaData.Wrapper.
Simplified ee10 DefaultServlet.ServletCoreRequest.
Other minor cleanups.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-24 16:25:53 +02:00
Greg Wilkins 465ddf0932 WIP replacing getPathInContext with static method 2022-10-24 17:55:16 +11:00
Greg Wilkins 30401d8cf8 WIP replacing getPathInContext with static method 2022-10-24 11:26:50 +11:00
Greg Wilkins 1885df7e03 WIP replacing getPathInContext with static method 2022-10-23 22:36:15 +11:00
Ludovic Orban 38289e46d4
Make Client's Request and Response `abort()` fully async (#8725)
Changed Request and Response abort() to be fully async by returning a CompletableFuture<Boolean>

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-10-21 15:32:46 +02:00
Lachlan 30138e9d03
Merge pull request #8742 from eclipse/jetty-12.0.x-websocket-disabled-tests
Re-enable and fix websocket tests for Jetty 12 ee9 and ee10
2022-10-21 13:08:55 +11:00
Greg Wilkins ac6abb307d
ResourceHandler set base resource as string (#8735)
* ResourceHandler set base resource as string

* ResourceCollection should not have a path

fixed tests
2022-10-21 09:32:54 +11:00
Lachlan Roberts 0e1bae4059 use RetainableByteBuffer for getBuffer in HttpContent
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-20 21:29:55 +11:00
Lachlan Roberts 8768725de9 separate evicting logic from CachingHttpContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-20 10:37:38 +11:00
Lachlan Roberts 86da43a54a improve configuration options for HttpContent.Factory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-20 10:00:04 +11:00
Joakim Erdfelt 259deea2f7
Jetty 12 - Resource `resolve()` and `newResource()` return null on resources that do not exist (#8702)
* Resource `resolve()` and `newResource()` return null on resources that do not exist
* Introduce `Resources` utility methods and use them
* Updating javadoc
2022-10-19 15:50:37 -05:00
Joakim Erdfelt 9061348ec4
Jetty 12 - Simplification of aliases in `PathResource` (Take 2) (#8734)
* simplify the PathResource.resolveTargetPath code
* changes to how PathResource handles aliases
* fix usages of Resource.getTargetUri()
* fixes for FileSystemResourceTest
* update javadoc for Resource.getTargetURI()
* rename getTargetURI to getCanonicalURI
* let resolveCanonicalPath return null if resource does not exist
* add test in PathResourceTest for broken symlinks
* some changes from review + optimization for exists()
* restore name to getTargetUri in Resource
* fix some tests related to PathResource changes
* revert changes to PathResource equals and hashcode
* also compare URI in PathResource
* checkAlias to resolveAlias
* PathResource cleanup
+ Adding comments about class fields.
+ Removing normalization from
  input/output/comparison flows.
+ Collapsing `resolveTargetPath`
  into `resolveAlias` to react
  accordingly to the exceptions
  that can flow out of Path.toRealPath().
+ Failure on Path.toRealPath() is never
  an alias, as the resource cannot ever
  be served anyway.
+ More comments in `resolveAlias()`
+ Failed / Bad / Nonexistent / Inaccessible
  resources are not aliases to anything.
* Renames of targetPath/targetUri
  `targetPath` to `realPath`
  `targetURI` to `realURI`
* Cleanup alias/aliasResolved booleans
* More testcase cleanup around not-exist
* Don't resolve alias on Error during toRealPath
* Add test to check how Alias check behaves if non-existent resource exists later

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 11:17:23 -05:00
Lachlan Roberts ad7ae3cfc9 Rename all HttpContent factories
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 17:10:15 +11:00
Lachlan Roberts c85f3f40a3 fix all disabled tests in websocket ee9
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-19 16:55:47 +11:00
Simone Bordet 02a7f1cce1
Re-enabled distribution tests that were disabled. (#8722)
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-18 20:10:57 +02:00
Joakim Erdfelt ad406ac44c
Cleaning up test cases with eye on work/temp file management 2022-10-18 07:50:44 -05:00
Lachlan Roberts cccc16c03e Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-HttpContent-Caching-Refactor 2022-10-18 22:28:13 +11:00
Joakim Erdfelt 586d0fd097
Merge branch 'jetty-12.0.x' of github.com:eclipse/jetty.project into jetty-12.0.x 2022-10-17 18:32:35 -05:00
Joakim Erdfelt 3c5fb319ec
Fixing ee9 MetaInfConfigurationTest usage of classpath to be compatible with ee8 conversion. 2022-10-17 17:09:36 -05:00
Simone Bordet 0d0790834d
Moved FastCGIProxyServlet in ee9 to FastCGIProxyHandler in core. (#8718)
Moved FastCGIProxyServlet in ee9 to FastCGIProxyHandler in core.
Moved TryFilesFilter in ee9 to TryPathsHandler in core.
Update Jetty modules to properly setup the class-path in case of proxy usage.

Fixes Surefire configuration to run the tests.
The problem is that fcgi-proxy depends on fcgi-client, so both will be put on the module-path.
However, fcgi-server is used for the tests, it is in the class-path, but depends on fcgi-client that is on the module-path.
Therefore, when a fcgi-server class tries to access a fcgi-client class, JPMS throws because the fcgi-client module does not export to the unnamed module.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-18 00:00:34 +02:00
Joakim Erdfelt 65c5e93351
Fixing checkstyle 2022-10-17 15:33:14 -05:00
Joakim Erdfelt 00c06738f0
Use MavenPaths where appropriate (ee9 -> ee8 conversion helper) 2022-10-17 15:23:24 -05:00
Joakim Erdfelt 1b790d51b4
Use WebAppContext.getResourceFactory() 2022-10-17 15:20:15 -05:00
Joakim Erdfelt f0856a4c7d
Fixed war file unpacking 2022-10-17 15:19:56 -05:00
Joakim Erdfelt a454150e7f
Improved addClassPath and addJars behavior
+ Less code
+ Corrected javadoc
2022-10-17 15:19:32 -05:00
Joakim Erdfelt 3e8697f926
Log bad Classpath URI entries 2022-10-17 15:18:43 -05:00
Joakim Erdfelt 81b1a6688d
Better use of WebAppContext.getResourceFactory() 2022-10-17 15:15:05 -05:00
Joakim Erdfelt 0e25d98a9d
Handle bad ContextHandler.setBaseResource more clearly 2022-10-17 15:10:55 -05:00
Jan Bartel e8b818db15 Reenable ee9 RequestScopedSessionSaveTest. 2022-10-17 17:15:02 +11:00
Jan Bartel a3bf740f42 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-10-17 11:36:40 +11:00
Simone Bordet a6f5e1fe8f
Merge pull request #8705 from eclipse/jetty-12.0.x-reenable-customrequestlog
Jetty 12 - Re-enabled RequestLog tests.
2022-10-14 10:30:12 +02:00
Joakim Erdfelt 45e706cb67
Move Resource.combine() methods to ResourceFactory 2022-10-13 14:08:21 -05:00
Joakim Erdfelt 28d448aef6
Fixing directory location name for additional classpath elements 2022-10-13 09:59:07 -05:00
Joakim Erdfelt b36e4d86c5
New test for tiny names and resource base name 2022-10-13 09:57:41 -05:00
Joakim Erdfelt 5148de7105
Making tokenPath creating reliable 2022-10-13 09:56:43 -05:00
Joakim Erdfelt 06d82d30e5
Making tokenPath creating reliable 2022-10-13 09:56:33 -05:00
Joakim Erdfelt 39f77f7e26
Increasing reliability of test on ee9/ee8 2022-10-13 09:55:57 -05:00
Joakim Erdfelt 0bd1253679
Increasing reliability of test on ee9/ee8 2022-10-13 09:55:45 -05:00
Joakim Erdfelt 2be5a2bda4
Increasing reliability of test when run on different filesystems 2022-10-13 09:55:18 -05:00
Joakim Erdfelt 5ae363d4e1
Increasing reliability of test on ee9/ee8 2022-10-13 09:54:27 -05:00
Joakim Erdfelt fee44a65f5
Adding TODO about odd WEB-INF behavior 2022-10-13 09:54:02 -05:00
Joakim Erdfelt c9910cec13
ServerListener uses Path as it has to Write a file reliably 2022-10-13 09:53:39 -05:00
Joakim Erdfelt caf69690ca
Adding TODO about copyTo() with IncludeExcludeSet 2022-10-13 09:53:18 -05:00
Joakim Erdfelt c66d64f761
Perform URI check properly, skip ResourceFactory for LocationEntry check 2022-10-13 09:50:22 -05:00
Joakim Erdfelt 6f91c93c06
Use MavenPaths.targetTestDir() instead 2022-10-13 09:49:52 -05:00
Joakim Erdfelt 58b416952c
Cleanup AttributeNormalizerTest 2022-10-13 09:49:03 -05:00
Lachlan Roberts 57f71ce77e extract the generation of getCompressedContentFormats to separate contentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-13 18:08:50 +11:00
Lachlan Roberts 2d161bfecd cleanups of HttpContentWrapper and ResourceService
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-13 17:25:47 +11:00
Olivier Lamy 573f27fd88
cherry-pick of #7803 (#8708)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-10-13 15:53:38 +10:00
Simone Bordet 557696653d
Re-enable RequestLog tests.
Re-implemented features that were commented out.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-12 17:46:49 +02:00
Lachlan Roberts 6771db40bf replace use of CachedContentFactory with CachingContentFactory
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-12 19:20:35 +11:00
Lachlan Roberts affa747b21 use jetty-core ResourceContentFactory in ee9
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-12 18:52:01 +11:00
Lachlan Roberts 6db4bf8aa0 remove getPrecompressedContents from HttpContent and ee9 impl
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-12 18:44:00 +11:00
Lachlan Roberts 6a6681a2df fix stampede creating CachingHttpContent & remove usage of getPreCompressedContentFormats
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-12 16:11:33 +11:00
Jan Bartel 756cf2102e
Fix jaas demos (#8689)
* Fix jaas demos add distro test
2022-10-12 09:33:14 +11:00
Lachlan Roberts a7383ea4de only check file modified time once per second for cached files
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-11 18:41:56 +11:00
Lachlan Roberts 1353f16d57 Refactor for CachingContentFactory and ResourceService
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-10-11 11:08:42 +11:00
Simone Bordet 2cbb0e19e0
Forward port of PR #7778 to `jetty-12.0.x`.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-10 16:22:26 +02:00
Olivier Lamy b1f8019860
simplify poms, add back missing changes from #7850 and #7687 (#8697)
* simplify poms, add back missing changes from #7850
* remove non used plugin, missing from #7687


Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-10-10 12:52:40 +10:00
Joakim Erdfelt 1ae87e03bb
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-servlet-pathmapping-regex 2022-10-07 08:43:49 -05:00
Simone Bordet c785f08b17
[Jetty 12] Made WebSocket over HTTP/2 work. (#8685)
* Made WebSocket over HTTP/2 work.

Re-enabled tests, and restored HTTP2StreamEndPoint,
as well as implemented getTunnelSupport() for HTTP/2.

Removed from HttpStream methods for upgrade that are
not necessary anymore.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-07 12:50:42 +02:00
Joakim Erdfelt dd3e3cf6e8
Aligning changes between ee9 & ee10 2022-10-07 05:36:20 -05:00
Joakim Erdfelt bada439bac
Missed ee9 changes 2022-10-07 05:26:06 -05:00
Joakim Erdfelt 9acc24212e
Merge pull request #8692 from eclipse/fix/jetty-12-remove-qosfilter-deprecated-methods
Jetty 12 - Remove deprecated methods from QoSFilter
2022-10-07 05:21:50 -05:00
Joakim Erdfelt 3dd47d1bff
Cleanup post-cherry-pick of RegexPathSpec changes
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-10-07 05:12:56 -05:00
Joakim Erdfelt 25dd6d0ef7
Cherry-pick of Improvements to PathSpec for Jetty 10.0.x (#8136)
* Cherry-pick of Improvements to PathSpec.
* From commit: 5b4d1dd1c6
* Fixing ConstraintSecurityHandler usage of PathMappings
* Fixing bad INCLUDE logic from cherry-pick in ServletHandler.doScope()
* Cleanup of non ServletPathSpec behaviors in ServletPathMapping class
* Skip optional group name/info lookup if regex fails.
* Prevent NPE on static servletPathMappings
* Update WebSocketMappings to use new PathMappings.getMatched(String)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-10-06 15:50:18 -05:00
Greg Wilkins 351fe53c9a
Fix #7891 regex pathInfo (#7892)
Fix 7891 regex pathInfo

+ Use the pathSpec methods to set servletPath and pathInfo when possible

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-10-06 15:44:01 -05:00
Greg Wilkins 024a053455
Issue #7748 - allow override of path mapping behavior in ServletContextHandler (#7614)
Added protected method to ServletHandler to allow other servlet mappings (eg regex) in embedded/extended usage

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-10-06 15:42:12 -05:00
markslater 1f844e8d57
#7863 Include value of first accept-encoding header where multiple accept-encoding headers are given. (#7864)
Signed-off-by: markslater <mark.slater@mail.com>
2022-10-06 13:10:25 -05:00
Joakim Erdfelt d7288cbcd2
Remove deprecated methods from QoSFilter 2022-10-06 11:36:32 -05:00
Joakim Erdfelt 281f0dc495
Fix bad test cases from merge 2022-10-06 09:17:48 -05:00
Olivier Lamy eb9d07378a
move flatten mojo configuration in top pom, fix boms and remove non needed content (#8686)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2022-10-06 06:50:45 +10:00
Joakim Erdfelt 9a7ce7a1f1
Fixing jackson-databind use in maven-plugins 2022-10-05 15:24:49 -05:00
Joakim Erdfelt 04dd551919
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-10-05 13:04:56 -05:00
Simone Bordet 7ed59f46c8
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-05 12:16:02 +02:00
Lachlan 05a4b96632
Merge pull request #8621 from eclipse/jetty-12.0.x-CachedContentFactory
Fix Caching ContentFactories in Jetty-12
2022-10-04 18:57:29 +11:00
Simone Bordet a3f2268766
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-03 18:28:36 +02:00
Lachlan 04e1df9373
Merge pull request #8619 from eclipse/jetty-12.0.x-8606-scopeListeners
Issue #8606 - Fix to ContextScopeListener for AsyncIOServletTest
2022-09-30 13:41:44 +10:00
Joakim Erdfelt 597a6af31d
Jetty 12 : `Descriptor` cleanup (#8611)
+ Sanity check Resource being provided
+ Descriptor toString changed to include full URI to descriptor
  so that it can be used consistently in Logging and Exception messages.
+ New Descriptor.toURI() for use in Servlet Source and other logging messages
+ Servlet Source value is now the URI of the Descriptor
+ More cleanup around `Source` location/name
   .getResource() must be a Resource
   as it's used in the AnnotationIntrospector
   all others use new .getName()
   Not all location/name usages can be loaded as
   a Resource.
2022-09-28 09:09:16 -05:00
Lachlan Roberts b893186f5e Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-8606-scopeListeners 2022-09-28 14:43:24 +10:00
Joakim Erdfelt 97eedaf9a6
Jetty 12 - Delay Resource Alias calculation until it's requested/needed (#8573)
* Delay Resource alias calculation until it's requested.
* Rename .getAlias() to .getTargetURI()
* PathResource resolveTargetAliasPath to resolveTargetPath
2022-09-27 13:03:47 -05:00
Joakim Erdfelt d73252a28c
Jetty 12 : `ResourceListing` produces XHTML (and is validated in test cases) (#8471)
* Produce XHTML output with tests that validate the XHTML.
* Adding ResourceListingTest and ensuring ResourceListing output is well formed.
* Introduce non-directory entry in ResourceListing test for ResourceCollection
2022-09-27 11:42:05 -05:00
Lachlan Roberts c58f769117 refactor test for resource lastModified comparisons
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-27 14:15:12 +10:00
Lachlan Roberts bed034c22d more fixes for test cases in DefaultServletTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-27 11:01:56 +10:00
Simone Bordet 06be091089
Introduced [Callback|Promise]Completable.with(Consumer) to simplify usage of CompletableFuture APIs.
Updated code to use the new APIs.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-26 22:15:17 +02:00
Simone Bordet f8f60822a7
Restored interim responses functionality (100 Continue, 102 Processing, 103 Early Hints) (#8615)
* Restored interim responses functionality (100 Continue, 102 Processing, 103 Early Hints) for core, ee9 and ee10.

Added ProcessingProtocolHandler and EarlyHintsProtocolHandler for the client.

Re-enabled all tests for interim responses for all protocols.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-26 16:48:11 +02:00
Joakim Erdfelt 144c78fe39
Jetty 12 : QuickStart generation based on Path, usage based on Resource (#8614)
* QuickStart generation based on Path, usage based on Resource
* QuickStart usage in jetty-maven-plugin uses Path
* Cleanup MavenWebAppContext constructor exceptions
* Improving quickStart stream filtering and array conversion
* Creating WEB-INF, if missing, now more reliable
2022-09-23 12:50:52 -05:00
Joakim Erdfelt 3eca6901cc
Jetty 12 : ResourceFactory.of(WebAppContext) to WebAppContext.getResourceFactory() (#8610)
* ResourceFactory.of(WebAppContext) to WebAppContext.getResourceFactory()
2022-09-23 05:38:21 -05:00
Lachlan Roberts bd1edb4736 Issue #8606 - Fixes for AsyncIOServletTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-23 17:48:22 +10:00
Greg Wilkins 2ca6dce08e Merged HotSwapHandler from ee9 to common 2022-09-23 17:21:54 +10:00
Greg Wilkins c4200aee9f Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-09-23 16:56:56 +10:00
Lachlan Roberts eaeb64f3b1 Issue #7286 - fix potential issue with websocket write timeout
Let websocket-core handle any idleTimeout & writeTimeouts instead of bad attempt to do it in Jetty/Javax API layers.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-23 15:16:10 +10:00
Joakim Erdfelt a3c2055e10 Bump log4j2 to 2.19.0 (#8605)
* Bump log4j2 to 2.19.0
+ Remove old exclusions to log4j in infinispan
  (no longer relevant)
* fix usage of log4j-slf4j2-impl

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
Co-authored-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-09-23 15:14:57 +10:00
Joakim Erdfelt b75896c2f5
Jetty 12 : XmlAppendable use Charset, not String (#8609)
* XmlAppendable use charset, not string
* Collapse Constructors into one
2022-09-22 15:06:02 -05:00
Simone Bordet d3e16fcff9 Updates from reviews.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Simone Bordet 910bb41702 Removed duplicate client transport tests already present in core.
Properly implemented request and response trailers for all the transports, both client and server.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Simone Bordet 854d5cdf6a Renamed ee9 client transport tests package.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Simone Bordet 8e68505524 Moving from ee9 to core more client transport tests.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Simone Bordet d001d95d9f Moving from ee9 to core the client transport tests that are generic enough to work in core.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Joakim Erdfelt 4fe414a762
Jetty 12 : precompressed content support for `ResourceService` (#8595)
* Remove Resource.getWeakETag in favor of new EtagUtils
* Protect bad usages of CachingContentFactory
* Working precompressed content for ResourceService
* Fixing DefaultServlet handling of ResourceService.writeHttpError() overrides
* Protect NPE in CachingContentFactory.isValid()
* Complete callback in DefaultServlet.writeHttpError
* Addressing review comments
* Testing for whole content
* Improve MemoryResource handling of name/filename
* EtagUtils handling of Resource
* Better protection of bad Resource impls in EtagUtils
* Update CachingContentFactory
+ Using Resource.lastModified were possible
+ CachingHttpContent has better Resource
  protection, and uses Etag from delegate
+ CachingHttpContent uses delegate where
  possible.
+ Store Etag HttpField in CachingHttpContent
  and allow override in constructor
* Simpler CachingHttpContent.isValid()
* Better handling of PrecompressedHttpContent

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-09-21 09:39:21 -05:00
Lachlan 050b4a988b
Merge pull request #8598 from eclipse/jetty-12.0.x-RemoteEndpointApiFix
Complete TODO to fix WebSocket RemoteEndpoint API in Jetty 12
2022-09-21 18:15:12 +10:00
Lachlan 97dd7b30d2
Merge pull request #8413 from eclipse/jetty-12.0.x-websocket-upgrade-contract
Jetty 12 : Strengthen WebSocket upgrade contract and other improvements
2022-09-21 18:14:27 +10:00
Joakim Erdfelt 95bf791b71
Jetty 12 - Improve FileID and use where appropriate (#8589)
* Use FileID where appropriate
* Adding FileID.matchesExtension
* Fixing demo modules start test
2022-09-20 09:35:50 -05:00
Lachlan Roberts e43346b042 fix error in AnnotatedPartialListenerTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-20 12:32:12 +10:00
Lachlan Roberts 88adc23915 Complete todo to fix WebSocket RemoteEndpoint API
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-19 19:11:31 +10:00
Lachlan Roberts 5296424e0a Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-websocket-upgrade-contract 2022-09-19 18:34:49 +10:00
Joakim Erdfelt 9668d614d9
Issue #8474 - Jetty 12 - `Resource.list()` API change + `Resource.getFileName()` addition (#8582)
* Issue #8474 - Resource.list and Resource.getFileName work
* Correcting signature of Resource.list and use it
* Introduce Resource.getFileName and use it
* Adding URIUtil.addPath() test to show file+str behavior

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-09-14 15:48:01 -05:00
Joakim Erdfelt 141c58208d
Merge branch 'jetty-11.0.x' into jetty-12.0.x 2022-09-13 10:11:40 -05:00
Lachlan Roberts 5d0f781cb7 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-websocket-upgrade-contract 2022-09-08 10:43:26 +10:00
Joakim Erdfelt 84c6f30dfd
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-pathresource-alias-detection-in-jarfile 2022-09-07 05:52:41 -05:00
Joakim Erdfelt 54cc1a3ff9
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-pathresource-alias-detection-in-jarfile 2022-09-06 19:36:53 -05:00
Joakim Erdfelt 156f57c9a0
Compartor chain instead 2022-09-06 17:07:40 -05:00
Joakim Erdfelt 678b9dada5
Overlay.unpackTo() needs to work if dir doesn't exist yet 2022-09-06 16:59:30 -05:00
Joakim Erdfelt 1cd0ac4959
Changes from review 2022-09-06 15:12:32 -05:00
Joakim Erdfelt c122c99163
lastAccessed is now an Instant 2022-09-06 15:09:44 -05:00
Joakim Erdfelt 7f88878df9
Change signature of Resource.lastModified()
+ Now returns Instant
2022-09-06 13:21:25 -05:00
Simone Bordet 8953873e67
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-06 12:31:54 +02:00
Olivier Lamy 0acd7df84b
jetty 12.0.x error unwrap servlet exception (#8491)
* unwrap servlet exception per default as expected by TCK

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-09-03 13:54:53 +10:00
Ludovic Orban bb83e835cf Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-09-02 09:12:24 +02:00
Olivier Lamy 0e526d9b3f fix deployment of some demo modules
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-23 12:15:38 +10:00
Olivier Lamy c8c6ae5fcf
skip deployment of test jars and remove some not needed bom dependencies (#8481)
* skip deployment of test jars and remove some not needed bom dependencies

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-20 19:54:29 +10:00
Olivier Lamy 8e732ccf72
using bom within the reactor is really a bad idea and it sources from ee10 in ee9 as well (#8479)
* using bom with the reactor is really a bad idea and it sources from ee10 in ee9 as well

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-19 21:24:09 +10:00
Olivier Lamy 8fdbf50222
Restore jetty-ee8-maven-plugin mvove back ITs to jetty-eeX-maven-plugin modules (#8472)
add back jetty-ee8-maven-plugin
- add back jetty-ee8-jspc-maven-plugin
- remove not used site plugin and simplify code
- moving back ee9 maven plugin ITs to the module
- back of ee10 maven ITs test to the plugin module


Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-19 17:50:58 +10:00
Simone Bordet a3ba86266a
Implemented ProxyHandler in new module jetty-core/jetty-proxy. (#8475)
Moved ConnectHandler to org.eclipse.jetty.server.handler, where it should have been from the start.

Cleaned up and corrected behavior of SecureRequestCustomizer.
Now the response is wrapped with isSecure=true if it arrived over a secure transport.
The request URI scheme indicates whether the request is secure towards the origin server.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-19 09:38:34 +02:00
Lachlan Roberts f6c923db10 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-08-17 19:24:20 +10:00
Lachlan Roberts ac18a0aec2 Issue #8448 - remove blocker usage from websocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-17 17:28:38 +10:00
Lachlan Roberts 82618073d5 PR #8413 - move wrapped req/resp attributes into WebSocketConstants
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-17 16:41:23 +10:00
Lachlan Roberts 87f2393467 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-websocket-upgrade-contract 2022-08-17 16:00:39 +10:00
Lachlan Roberts bf83e55999 keep CreatorNegotiator internal
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-17 15:54:09 +10:00
Joakim Erdfelt 180d68f585
Updating WebAppDefaultServletTest 2022-08-16 19:25:27 -05:00
Joakim Erdfelt 6191377504
Proper "?" vs "%3F" handling 2022-08-16 16:31:42 -05:00
Joakim Erdfelt 739a0f77da
Fixing OneWebApp (EE9) test issue 2022-08-16 15:05:28 -05:00
Joakim Erdfelt 94317e2a6a
Fixing ProxyWebAppTest test issue 2022-08-16 15:05:19 -05:00
Joakim Erdfelt d16b1cd595
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-pathresource-alias-detection-in-jarfile 2022-08-15 18:39:21 -05:00
Lachlan Roberts f19577c197 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-8426-aliaschecker-review 2022-08-15 17:05:58 +10:00
Lachlan Roberts 2c42c0de83 Issue #8456 - serve jetty-dir.css as resource in ee10 ResourceService
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-15 15:33:28 +10:00
Lachlan Roberts ffc14a80b9 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-8426-aliaschecker-review 2022-08-15 13:16:51 +10:00
Greg Wilkins af5fecd18d
Jetty 12 : Rename resourceBase to baseResource (#8310)
* rename to baseResource
2022-08-15 12:24:13 +10:00
Lachlan Roberts a6b88cfead fix failures in ResourceHandlerTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-15 11:00:25 +10:00
Lachlan Roberts 8e172f311e Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-8426-aliaschecker-review 2022-08-15 10:40:59 +10:00
Lachlan Roberts 9e745f7fdb Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-08-15 10:32:03 +10:00
Lachlan Roberts ef700ff288 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-08-15 10:26:36 +10:00
Simone Bordet 601cba0b18
Fixed javadocs.
Javadoc generation for the jetty-quic-quiche-* modules may need
to use a <profile> since the APIs used depend on the Java version.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-13 17:45:26 +02:00
Olivier Lamy c011126e63
fix hardcoding versions in mod files (#8459)
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-13 19:43:07 +10:00
Simone Bordet 6f0f8854de
Merged branch 'jetty-12.0.x' into 'jetty-12.0.x-module-renaming'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 17:31:01 +02:00
Olivier Lamy 44a37746e6
Jetty 12 : reactivate `jetty-ee9-demo-embedded` and `jetty-ee9-demo-proxy-webapp` and add more (#8419)
* ee8 demos to use ee9 demos resources
* add jetty-ee8-demo-jaas-webapp
* add jetty-ee8-demo-jndi-webapp jetty-ee8-demo-mock-resources
* uhm jetty-ee8-demo-jetty-webapp have some issues
* fix jetty-ee8-demo-jetty-webapp
* fix some jetty-ee9-demo-embedded and add back jetty-ee8-demo-proxy-webapp
* demo-embedded need to have jetty-ee9-demo-jsp-webapp built first
* fixing more demos modules. Activate dist test for demo modules and all env


Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-12 17:52:53 +10:00
Simone Bordet 1eea480764
Jetty 12 module renaming - jetty-websocket.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 09:33:31 +02:00
Simone Bordet 122b095260
Jetty 12 module renaming - jetty-http3.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 09:33:31 +02:00
Simone Bordet 7d264e6024
Jetty 12 module renaming - jetty-http2.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 09:33:31 +02:00
Simone Bordet 11c3642892
Jetty 12 module renaming - jetty-fcgi.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 09:33:31 +02:00
Greg Wilkins a494afa635 fix #8448 Blocking is not complete
Use FutureCallback when usage is optional
2022-08-11 15:26:20 +10:00
Lachlan Roberts 8f27e9a463 ee9 should use jett-core protected targets and alias checkers
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-11 13:59:54 +10:00
Greg Wilkins fcdb8305de WIP #8441 isNotNormalWithinSelf
Added method to be optimized later
2022-08-11 12:52:19 +10:00
Greg Wilkins a0d6f42e73 Fix #8442 server propagation
Test setServer propagation
protect from inadvertent null setting
2022-08-11 09:05:12 +10:00
Joakim Erdfelt 842af3ed22
Avoid recreating `Resource` during container/jar pattern filtering in `MetaInfConfiguration`
* Delete PatternMatcher.java
2022-08-10 16:12:15 -05:00
Joakim Erdfelt 505baf4a4c
Merge remote-tracking branch 'origin/jetty-12.0.x' into fix/jetty-12-pathresource-alias-detection-in-jarfile 2022-08-10 13:03:37 -05:00
Joakim Erdfelt 9312359b13
Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x 2022-08-10 12:59:37 -05:00
Joakim Erdfelt 0023281e3f
Adding in-code comments about WebAppContext.getWebInf behavior 2022-08-10 12:59:29 -05:00
Simone Bordet af77a53e39
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-10 16:51:35 +02:00
Greg Wilkins d9b53a6174 fix ee9 demo context paths
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-08-10 17:33:58 +10:00
Jan Bartel 42f72268cf
Jetty 12 : #8408 Support new `<cookie-config>` concepts in Servlet 6 (#8420)
* Issue #8408 Implement new session cookie attributes
2022-08-10 16:33:08 +10:00
Lachlan Roberts d210677182 re-enable ee9 openid module
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-10 13:51:47 +10:00
Greg Wilkins 408de26ec2 Created core-demo and updated demo root
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-08-10 12:04:39 +10:00
Joakim Erdfelt 81f80fa365
Putting content.jar in a place that EE8 tooling can find. 2022-08-09 14:56:26 -05:00
Joakim Erdfelt f7b8ed4c06
Rework PathResource.checkAliasPath to handle `jar:file:` paths more elegantly. 2022-08-09 10:54:54 -05:00
Joakim Erdfelt 199a9cd2ad
Jetty 12 : XML namespace cleanup (#8406)
* Adding Servlet 6 XML Entities
* Fixing bad xsi:schemaLocation entries
* Update all jetty-ee10 web XMLs to JakartaEE version 6.0 based
* Using XML Catalog
* Introducing catalogs for:
   - default XML xsd/dtd (catalog-org.w3.xml)
   - Configure dtd (catalog-configure.xml)
   - EE10 Servlet 6 xsd/dtd (catalog-ee10.xml)
   - EE9 Servlet 5 xsd/dtd (catalog-ee9.xml)
   - EE8 Servlet 4 xsd/dtd (catalog-ee8.xml)
* New XmlParser.addCatalog(URI catalogXml, Class<?> classBase)
   to allow the loading of a catalog which has it's resources
   referenced via the classBase.getResource(name)
* WebDescriptor uses Environment to load appropriate catalog.
* Remove XmlParser.redirectEntity(String, String)
2022-08-09 06:34:29 -05:00
Lachlan Roberts 6101384cf6 use attributes instead of attachable for wrapped request/response
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-09 15:46:14 +10:00
Joakim Erdfelt 21546e390c
Jetty 12 : Simplify `AnnotationParser` scanning for class files (#8404)
* Improved FileID.isHidden
* Simplified AnnotationParser
  + Not using MultiReleaseJarFile
  + Walk of a Directory or a JAR is the same
  + Reduced parse method count
  + Fixed TestAnnotationParser
     Using proper fully qualified classnames now (were not yet converted over to jetty-12 naming)
* Single parseClass method
* Single parseDir method
* Adapting ee9 AnnotationParser to have the same behaviors as ee10.
* Deleting TestAnnotationInheritance tests
  + We don't want the AnnotationParser
    creating new Resource objects for Class.getSuperClass()
    resources that don't belong to
    the same Resource that the passed
    in class belongs to (as this is out of
    scope for the Mount management).

    Imagine if told to parse ClassB
    which extends from ClassFoo, which
    is in a different JAR than ClassB?

    This concept from Jetty 9/10/11
    was only used in testcases and not
    in live runtime code, so it was
    removed.

Co-authored-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-05 15:42:27 -05:00
Joakim Erdfelt fee8f2b4f4
JettyEmbedded needs a Server instance earlier for applyXmlConfigurations and its ResourceFactory to operate properly 2022-08-05 12:59:22 -05:00
Joakim Erdfelt fe21198499
Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-rework-resource-factory 2022-08-05 11:11:39 -05:00
Joakim Erdfelt d7768b3f53
QuickStartTest - inline ResourceFactory 2022-08-05 10:53:47 -05:00
Joakim Erdfelt dd6953e018
Restore TODO in ee9 DefaultServlet 2022-08-05 10:49:16 -05:00
Joakim Erdfelt b7d7a9918a
Proper JettyEmbedder XML to Server logic 2022-08-05 10:46:20 -05:00
Joakim Erdfelt a864a9313b
Remove System.err output 2022-08-05 10:40:14 -05:00
Joakim Erdfelt 21a40f60a7
Inline ResourceFactory 2022-08-05 10:31:26 -05:00
Joakim Erdfelt b8334b6786
Use XML created Server 2022-08-05 10:23:56 -05:00
Joakim Erdfelt 4af68620ae
Add TODO about PropertyUserStore.setConfig(String) 2022-08-05 10:17:52 -05:00
Joakim Erdfelt cd375d2835
Inline ResourceFactory.of(Container) usages in demos 2022-08-05 10:15:12 -05:00
Olivier Lamy 439bd12c7f fix NPE
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-05 15:54:10 +10:00
Joakim Erdfelt 7e9aeaa343
Revert src/test/resources/* to target/test-classes/* in ee9 2022-08-04 19:33:08 -05:00
Joakim Erdfelt 40b1bcef5f
More work to use ResourceFactory properly 2022-08-04 17:54:37 -05:00
Joakim Erdfelt 8877f52dd7
Add WebAppContext.getResourceFactory() 2022-08-04 17:22:26 -05:00
Joakim Erdfelt 58eea0541c
Allow ResourceHandler to serve content from base resource 2022-08-04 17:22:02 -05:00
Joakim Erdfelt 532933be0b
jetty-ee#-webapp mount fixes 2022-08-04 13:35:30 -05:00
Joakim Erdfelt f92c992178
Allow DefaultServlet to resolve static resources 2022-08-04 13:10:19 -05:00
Joakim Erdfelt 6f6c327d8e
Improve reliability of TempDirTest 2022-08-04 12:38:23 -05:00
Joakim Erdfelt 19039f4df8
Remove maxBuffer from ContentFactory.getContent(String) (#8403) 2022-08-04 17:32:50 +02:00
Simone Bordet 90fc840f43
Jetty 12 : Renamed FutureFormFields to just FormFields, as it is mostly used (#8411)
Renamed FutureFormFields to just FormFields, as it is mostly used
as a CompletableFuture, and the "Future" prefix is soo Java 5 :)

Improved releasing of chunks in FormFields implementation.

Improved configuration of FormFields for max number of fields and max form content length.

Fixed Field.toString().

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-04 17:18:13 +02:00
Simone Bordet c077bbecaa
Jetty 12.0.x MultiPart (#8201)
Moved multipart test files to jetty-http.

Introduced jetty-http `MultiPart` class and made `MultiPart.Parser` non-blocking and lenient on newlines.
Made `MultiPartCaptureTest` to pass.

Moved o.e.j.server.MultiPartParserTest tests to o.e.j.http.MultiPartTest.

Renamed MultiPartFormInputStreamTest to MultiPartsTest.

Introduced class o.e.j.server.MultiParts, a CompletableFuture of Parts
that can be used asynchronously in Handlers and in general in core Jetty.

Implemented multi-part handling in ee10.

Implemented DelayedHandler.UntilMultiPart.

Introduced MultiPart.ContentSource as the multipart "generator".

Replaced ByteBuffer/boolean pair with Chunk and implement Chunk slicing & improve retainability for MultiPart parser.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2022-08-04 17:03:40 +02:00
Joakim Erdfelt d97ab506f7
Improved version based on review 2022-08-04 09:15:13 -05:00
Joakim Erdfelt 1f1b9dc2dc
Better handling of jetty-dir.css and favicon.ico 2022-08-04 08:37:56 -05:00
Lachlan Roberts f67f605acb update javadoc and fix ee9 implementations
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-04 18:58:58 +10:00