Commit Graph

1086 Commits

Author SHA1 Message Date
Lachlan Roberts bd1edb4736 Issue #8606 - Fixes for AsyncIOServletTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-23 17:48:22 +10:00
Lachlan Roberts 138219d7da fix import ordering
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-23 15:16:12 +10:00
Lachlan Roberts 9536ef8ce5 Merge of changes from #8599 to EE10 WebSocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-23 15:16:12 +10:00
Joakim Erdfelt 2c335eb7dd
Jetty 12 : Correct appassembler error during `jetty-ee10-test-quickstart` (#8616)
* appassembler-maven-plugin is not needed anymore
2022-09-23 15:07:11 +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 0a267fa8d5 Renamed ee10 client transport tests package.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-09-21 20:03:49 +02:00
Simone Bordet d12b46b269 Renamed ee10 client transport tests module.
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 53c0d7b9b4 Complete todo to fix WebSocket RemoteEndpoint API
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-19 19:10:33 +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 9ebaf3cf53
Adding ee10 RequestTest 2022-09-13 11:35:06 -05:00
Joakim Erdfelt 3d1150fd60
Issue #8462 - Adding testcase to prove out behavior 2022-09-08 13:32:48 -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
Lachlan 860554b71b
Merge pull request #8547 from eclipse/jetty-12.0.x-disabledTestFixes
re-enabling and fixing some tests for Jetty-12
2022-09-08 10:27:10 +10:00
Lachlan 5ccd0d7fc4
Merge pull request #8548 from eclipse/jetty-12.0.x-ee10-statisticsServlet
Fix the StatisticsServlet for Jetty-12 EE10
2022-09-08 10:24:44 +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 ff35c0e5ef
Updating from review comments. 2022-09-06 19:44: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 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 7f88878df9
Change signature of Resource.lastModified()
+ Now returns Instant
2022-09-06 13:21:25 -05:00
Lachlan Roberts 6eb96b70a5 fully decode pathInfo in ResponseHeadersTest.MultilineResponseValueServlet
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-06 23:44:31 +10: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
Lachlan Roberts 13032a2cd2 fix checkstyle issues
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-06 18:50:41 +10:00
Lachlan Roberts 2d63071e73 Fix the StatisticsServlet for Jetty-12 EE10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-06 18:28:04 +10:00
Lachlan Roberts 22bec1976c Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-disabledTestFixes 2022-09-06 17:56:43 +10:00
Lachlan Roberts a4b7619906 re-enable SessionHandlerTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-06 17:49:22 +10:00
Lachlan Roberts 89bb2a9593 re-enable and fix ResponseHeadersTest.testMultilineResponseHeaderValue
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-06 17:48:18 +10: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
Lachlan Roberts 984f50bd22 Fix failures in FormTest by fixing bugs in FormFields
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-01 15:51:12 +10:00
Lachlan Roberts 81d695c501 uncomment IncludedServletTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-01 15:24:03 +10:00
Lachlan Roberts ec7c1137ff uncomment testWelcomeExactServlet test
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-09-01 10:13:09 +10:00
Olivier Lamy d533040ea7
fix ee8 jstl module and demo (#8484)
* add distribution test for demo jstl
* fix default pattern, not more need of taglib

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-25 07:06:30 +10: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 9f92b6b7be PR #8413 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-17 16:34:48 +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
Simone Bordet b5332c38a9 Implemented ranged requests and responses.
Refactored MultiPart so that the different behavior between
multipart/form-data and multipart/byteranges is captured in the code.

Renamed MultiParts to MultiPartFormData, and ServletMultiParts to ServletMultiPartFormData.

Introduced MultiPartByteRanges and used it to implement ranges in ResourceService.
Re-enabled multipart tests for ranges that were disabled, and added more.

Modernized and simplified implementation of ByteRange.
Updated ByteRangeTest.

Removed RangeWriter and its subclasses and their tests, as they are not used anymore.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-15 17:32:02 +02:00
Greg Wilkins 6cc10d611d Added tests for ServletContext resources from collections 2022-08-15 19:58:01 +10: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
Greg Wilkins edba0c36c7 Work around for #8462 ee10 handling of %2F
This is a provisional workaround for #8462 that fixes the bugs in URIUtil that were preventing encoded %2F being seen as an alias.

However, the better ultimate fix would be to see an encoded request as a request for a path segment that includes %2F.
2022-08-15 13:58:29 +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 db359ff8a5 Reenable ee10 protected target exceptions 2022-08-15 13:05:44 +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 51d61d4c82 fix compile issues after removal of AllowSymLinkAliasChecker
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-15 11:14:11 +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
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
Ludovic Orban 01cdfb19d4
restore mount leak detection (#8457)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-13 08:25:39 +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
Simone Bordet 0915492a7b
Jetty 12 module renaming - demos.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-08-12 10:12:39 +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 7d2f9fa3c0 Fixed build 2022-08-12 08:48:11 +10:00
Jan Bartel 8c4474d614 Squashed commit of the following:
commit dfe4640d8de7bf815f06ab56eea0c40a1ae34fbb
Merge: dfe0f76e5f fac047905a
Author: Jan Bartel <janb@webtide.com>
Date:   Fri Aug 12 08:36:00 2022 +1000

    Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-8430-implement-declareroles

commit dfe0f76e5f9dfaf62a7e3a31eeba3a9ef8b9e5c2
Merge: 0e099459ac 21944ab95c
Author: Jan Bartel <janb@webtide.com>
Date:   Wed Aug 10 16:48:13 2022 +1000

    Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-8430-implement-declareroles

commit 0e099459acbf97e00b85a4d36a390f2c459f24d3
Author: Jan Bartel <janb@webtide.com>
Date:   Tue Aug 9 13:38:43 2022 +1000

    Issue #8430 implement declareRoles for ee10
2022-08-12 08:38:02 +10:00
Jan Bartel 52f1c91cca Merge remote-tracking branch 'origin/jetty-12.0.x-8447-remove-ELContextCleaner-ee10' into jetty-12.0.x 2022-08-12 08:23:09 +10:00
Jan Bartel 95af780d17 Implement special extension to allow headers to be set in include 2022-08-12 08:17:56 +10:00
Jan Bartel 4475537339 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-8447-remove-ELContextCleaner-ee10 2022-08-12 07:09:34 +10:00
Jan Bartel d35892c0c2 Issue #8447 Remove ELContextCleaner for ee10 2022-08-11 17:55:37 +10:00
Greg Wilkins 20bab8a471 Fix build 2022-08-11 16:34:10 +10: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
Lachlan Roberts 941527e27f make alias checking in ee10 use core alias checkers
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-11 11:52:27 +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 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
Jan Bartel 21944ab95c
Issue #8431 Servlet 6 allows dynamic listeners to call getters (#8432) 2022-08-10 16:34:50 +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
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 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
Lachlan Roberts 19e2e7babc Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-08-08 16:15:53 +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 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 d5a0b2bd1e more fixes on Resource
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-08-05 18:48:08 +10: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 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 532933be0b
jetty-ee#-webapp mount fixes 2022-08-04 13:35:30 -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
Ludovic Orban 4b3a329cb2 properly initialize static resource factory
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-04 11:00:19 +02: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
Ludovic Orban 94a60dd862 fix NPE's
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-04 10:55:52 +02:00
Lachlan Roberts c1cf35d7d5 fix websocket test failures
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-04 16:20:48 +10:00
Lachlan Roberts 43d4e47056 Simplify Core API by making WebSocketNegotiation internal
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-04 13:42:39 +10:00
Lachlan Roberts 297e717ca1 improve javadoc to strengthen contract for websocket upgrade
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-04 11:23:54 +10:00
Lachlan Roberts a391dc4aa9 Use wrapped HttpServlet req/resp instead of base ones from ServletContextRequest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-08-04 10:10:59 +10:00
Ludovic Orban d50aa39549 fix mount leaks
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 20:44:17 +02:00
Ludovic Orban dd72e844a3 fix tests
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 18:04:01 +02:00
Ludovic Orban 7a28563bcc move toURI to URIUtil
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 17:04:22 +02:00
Ludovic Orban 50c19d317b Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-rework-resource-factory 2022-08-03 17:00:24 +02:00
Ludovic Orban 5ca51c97ad hide ResourceFactory internals and cleanup Mount leftovers
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 16:59:02 +02:00
Ludovic Orban cbff6840d6 fix tests
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 16:09:21 +02:00
Ludovic Orban 2459e7a2cc fix compilation errors
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 14:12:23 +02:00
Joakim Erdfelt 6ce295ce7a
Remove static Resources.isContainedIn API 2022-08-03 06:59:17 -05:00
Ludovic Orban da3fef6d58 make of(Container container) remove the bean when the container is stopped
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 13:36:00 +02:00
Joakim Erdfelt b4d526796e
Merge pull request #8407 from eclipse/fix/jetty-12-remove-unused-resource-apis
Jetty 12 : Remove unused Resource APIs
2022-08-03 06:15:08 -05:00
Ludovic Orban cb348c8d15 rename of() -> combine()
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 13:06:32 +02:00
Ludovic Orban fb0290c88a replace ROOT references with root()
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 12:51:57 +02:00
Ludovic Orban b3dbfad97d move newSystemResource to ResourceFactory
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 12:43:08 +02:00
Ludovic Orban f943d095f4 rework ResourceFactory and Resource according to redux3 prototype
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-08-03 11:32:21 +02:00
Joakim Erdfelt 4e4d516952
Fixing compilation 2022-08-02 16:07:39 -05:00
Jan Bartel dad19533b8 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-rm-deprecated-initializer 2022-08-02 16:55:24 +10:00
Joakim Erdfelt acdf682f67
Restoring jetty-logging.properties 2022-08-01 21:48:09 -05:00
Joakim Erdfelt e848dd0852
Fixing missing XML entities
+ Adding missing core XML entities
  to jetty-xml project
  * datatypes.dtd
  * xml.xsd
  * XMLSchema.dtd
+ registering core XML entities
  in XmlParser itself
+ adding new tests
+ Descriptor now catches SAXException
+ WebDescriptor doesn't worry about
  core XML entities
2022-08-01 21:48:09 -05:00
Joakim Erdfelt 84f6dc7f4c
Review of Resource throwables 2022-08-01 21:48:08 -05:00
Joakim Erdfelt e1ebef2ca6
Changing contract of Resource.resolve(String)
No longer throws IOException
2022-08-01 21:48:07 -05:00
Joakim Erdfelt e6be9fb14c
Updates from review 2022-08-01 21:48:07 -05:00
Joakim Erdfelt 98fa52ef30
Updating FileID.isTld(Path) 2022-08-01 21:48:07 -05:00
Joakim Erdfelt dd7dda2c53
Move FileID from deploy to util
+ Move static methods from other
  places to FileID or URIUtil
  - MultiReleaseJarFile
  - Resource
  - MetaInfConfiguration
+ Improve testing of URIUtil and FileID
2022-08-01 21:48:00 -05:00
Jan Bartel ef1cd2b35d Remove deprecated classes from annotation initialization. 2022-08-02 12:00:59 +10:00
Joakim Erdfelt caff1b036b
Jetty 12 - Cleanup MultiReleaseJarFile to use newFileSystem behaviors built into JVM (#8328)
* Cleanup MultiReleaseJarFile to use newFileSystem behaviors built into JVM
* Adding more testing to MultiReleaseJarFile
* Updating AnnotationParser and MetaInfConfiguration
* Created URIUtil.streamOf(URLClassLoader) to aid
  in proper conversion of URLClassLoader.toURLs to URIs
* Introduce URIUtil.fixBadJavaIoFileUrl
  Addresses bad java.io.File.toURL().toURI() issues
  file:/path to file:///path
* Better URI pool/key behaviors in FileSystemPool
* no arg AnnotationParser uses ASM_VERSION
2022-07-29 10:08:32 -05:00
Joakim Erdfelt c6c0eb0313
Jetty-12 : Immutable ResourceCollection and Context based mount management (#8337)
* Immutable ResourceCollection with mount management.

* Internal List<Resource> is now immutable so that .getResources() cannot be modified.
* Improved Resource.toJarFileUri implementation that keeps the deep archive references
* Introducing Resource.mountCollection() methods
  + ResourceCollection is now a private class
  + Resource.mountCollection() returns a Mount
  + Places that use this technique are now putting the Mount in the context's beans for the context to close those mounts.
* Cleanup names/comments in FileSystemResourceTest
* Adding missing test of attempting to create a Resource from a URI `jar:file:foo.jar!/` while not mounted.
* Reworked ResourceCollection behaviors based on feedback.
  + Eliminated all Resource.mountCollection() methods except the Collection<URI> one.
* Eliminated Resource.mountIfNeeded(Resource)
* Eliminated Resource.fromList implementations
* Introduced @gregw Resource.of() implementations
* Introduced Resource.split() to honor old split logic from Jetty 9/10/11, with glob support, but now it only converts to List<URI>
* Remove IOException from Mount.root() method
* ResourceCollection now flattens and uniques any nested ResourceCollection entries it encounters
* Expanded ResourceCollectionTest to cover more code paths
* Add ResourceTest for new split() method
* Fixing testcase to use a directory that exists on setExtraClasspath
* Increase reliability of WebAppContextTests
* Updates for working with webapp.extraClasspath
* Introduced Resource.unwrapContainer to help in servlet cases where the raw JAR path should be represented in a ServletContext attribute.
* Made FileSystemPool.containerUri just use new Resource.unwrapContainer
* webapp MetaData updated to use URIs references to Libs (not File objects)
* jetty-ee#-maven-plugin use URIs for its classpath tracking to aid in mounting issues later
* webapp extraClasspath supports raw JAR references as well as glob now, supported by Resource.split(String)
2022-07-28 08:59:17 -05:00
Lachlan 0f35590ab4
Merge pull request #8341 from eclipse/jetty-12.0.x-dispatcher-fixes
fix some tests for Jetty 12 ee10 servlets
2022-07-28 18:57:19 +10:00
Ludovic Orban b1d5f908a6 fix mounting/unmounting lifecycle of TLD resources
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-28 10:16:02 +02:00
Ludovic Orban 1cb80cf4ca fix compilation error and re-enable tests
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-28 10:16:02 +02:00
Ludovic Orban 905352816d make sure TLD file actually is a file
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-28 10:16:02 +02:00
Ludovic Orban a84a86d820 handle review comments
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-28 10:16:02 +02:00
Ludovic Orban 9f0463b545 remove old Resource defaultUseCache mechanism
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-28 10:16:02 +02:00
Lachlan Roberts 0abe0ccf48 go to base ServletApiRequest to extract source query params
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-28 17:28:58 +10:00
Lachlan Roberts c435f56d0c fix issues with parameter merging for request dispatches
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-28 14:46:26 +10:00
Ludovic Orban 0c0c333970 get rid of EmptyResource
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-27 16:04:22 +02:00
Ludovic Orban 4856a7d065 keep, un-deprecate and rename Resource.getReadableByteChannel() and Resource.getInputStream()
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-07-27 16:04:22 +02:00
Greg Wilkins 2275e1c2c6
Refactored MultiException into ExceptionUtil (#8340) 2022-07-27 18:07:57 +10:00
Lachlan Roberts eed5ad24cd #8343 - fix issues with regex pathspec and query decoding
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-27 14:17:10 +10:00
Lachlan Roberts ce7dc44075 #8343 - add extra test for %2F and %3F in uri
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-27 12:25:43 +10:00
Lachlan Roberts e6db23afc5 fix use of canonicalPath after #8343
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-27 11:29:12 +10:00
Lachlan Roberts f81bdc9711 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-dispatcher-fixes 2022-07-27 11:27:26 +10:00
Greg Wilkins d369adf55b
Jetty 12.0.x canonical uri (#8343)
Somehow the URIUtil class had switched over the meaning of normal and canonical. This PR renames them to correct this:
 * canonical paths are always normal
 * Always canonicalize paths passed from the application
 * Switch the URIUtil names for canonical and normal
2022-07-27 09:58:50 +10:00
Lachlan Roberts b6bc0f0b07 fix tests in EncodedURITest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-26 15:25:34 +10:00
Lachlan Roberts ce8048c4bd fix tests in AsyncServletTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-26 15:04:45 +10:00
Lachlan Roberts d56a4e0dd3 normalize path when registering a pathSpec for Servlet/Filter
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-26 15:02:31 +10:00
Lachlan Roberts ce3c0b7036 fix DispatcherForwardTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-26 13:34:59 +10:00
Lachlan Roberts 69c83c76a6 re-enable DefaultServletTest.testWelcomeServlet
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-26 11:36:44 +10:00
Greg Wilkins 83ae7afe2b Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-dispatcher-fixes 2022-07-26 11:07:27 +10:00
Joakim Erdfelt 0d75a87886
Adding comment about usage 2022-07-25 09:59:14 -05:00
Simone Bordet 69a7b06f06
Jetty 12.0.x retainable chunk (#8325)
Made Chunk implement Retainable, and protocol implementations
to link the RetainableByteBuffer all the way to the Chunk.

Extended Retainable to have both a retain() and a release() methods.

Removed HTTP/2's ISession and IStream, now just using HTTP2Session and HTTP2Stream.
Removed *.Adapter classes in favor of interfaces with default methods.

Javadoc additions and clarifications.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-07-25 13:22:14 +02:00
Olivier Lamy 82338660a8
add jetty-ee8-proxy (#8332)
* restore ee8 proxy

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-07-25 19:54:18 +10:00
Lachlan Roberts 9efce15804 reopen HttpOutput in same places as Jetty 11
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-25 16:56:39 +10:00
Joakim Erdfelt ba4405e05b
Comment/TODO updates for Jetty 12.0.x from review with @gregw 2022-07-24 21:31:30 -05:00
Simone Bordet e4de4fd189
Re-enabled the documentation module. (#8326)
Re-enabled the documentation module.

Now using ee10 rather than ee9.
Updated sources to reference ee10 implementation classes.
Now -DskipTests will compile the documentation classes but not build the documentation, saving time when building.

Much more work to do to update the documentation for Jetty 12.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-07-22 13:41:09 +02:00
Simone Bordet 8cb09e4c59
Re-enabled jetty-ee9-proxy and jetty-ee10-proxy modules. (#8289)
* Re-enabled jetty-ee9-proxy and jetty-ee10-proxy modules.
Introduced TunnelSupport to abstract out the tunnelling capabilities.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-07-22 13:36:47 +02:00
Joakim Erdfelt 131fd00285
Jetty-12 : Testing for ResourceHandler / ResourceService (#8327)
* Overhaul of ResourceHandlerTest
* Making ResourceHandlerTest more flexible for testing
  + Each test has it's own docroot
  + Each test decides what it's docroot contents are
* Support QuotedQualityCSV(List<String>)
2022-07-21 15:12:19 -05:00
Lachlan Roberts fe4ce1443b merge openid changes to ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-20 15:11:02 +10:00
Joakim Erdfelt e84b84e09c
Have jetty-ee#-maven-plugin manage the deployer environment as well 2022-07-19 11:46:20 -05:00
Joakim Erdfelt 76d7bf7c7a
NYI: ServletContextRequest.ServletApiRequest.newPushBuilder 2022-07-18 13:44:36 -05:00
Joakim Erdfelt 7fb119bb32
Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-07-18 12:50:16 -05:00
Joakim Erdfelt fcc443088f
More work cleaning up DefaultServletTest
+ fixed DefaultServletTest.testOutputStreamAndCharsetFiltered
+ fixed DefaultServletTest.testWriterAndCharsetFiltered
2022-07-15 13:17:11 -05:00
Joakim Erdfelt 1ff98c3d2b
Disabled currently broken DispatcherTest.testForwardSendError 2022-07-15 11:24:34 -05:00
Joakim Erdfelt 2a2e252de9
Cleanup existing DispatcherTest (before fixing disabled tests) 2022-07-15 10:57:18 -05:00
Joakim Erdfelt 60b618d71d
Remove errorClose -> softClose temporarily as it breaks too much. 2022-07-15 08:30:06 -05:00
Joakim Erdfelt 07dd27c251
Merge branch 'jetty-12.0.x' of github.com:eclipse/jetty.project into jetty-12.0.x 2022-07-14 20:33:36 -05:00
Joakim Erdfelt 9b5d4ce8e2
More DefaultServletTest additions 2022-07-14 18:38:21 -05:00
Greg Wilkins fc6a92f426 More work on the demos 2022-07-15 09:18:52 +10:00
Joakim Erdfelt 4ae4d01549
Enable more DefaultServletTest methods 2022-07-14 16:19:24 -05:00
Joakim Erdfelt 0dc65e5588
Fixing DefaultServlet Alias Checking
+ Fixing DefaultServletTest.testSymLinks
2022-07-14 16:17:12 -05:00
Joakim Erdfelt da2af1141a
DefaultServlet include effort (incomplete) 2022-07-14 15:56:49 -05:00
Joakim Erdfelt e1ee2e3fa2
Fixing DefaultServletTest.testWelcomeMultipleDefaultServletsDifferentBases 2022-07-14 15:33:02 -05:00
Joakim Erdfelt 7133c0827e
Cleanup of DefaultServletTest 2022-07-14 13:40:35 -05:00
Greg Wilkins cdc1b079ae ee8 ee9 ee10 webapp demos
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-07-14 16:15:22 +10:00
Joakim Erdfelt 3beaa3997f
Updates to DefaultServletTest 2022-07-13 17:10:43 -05:00
Greg Wilkins ef97381c96 Remove Generic Request/Response #8291
Use Blocker to avoid race between servlet completion and welcome write
2022-07-13 20:26:54 +10:00
Greg Wilkins 1e4fd831ba Remove Generic Request/Response #8291
Replaced Generic Request/Response
2022-07-13 20:26:54 +10:00
Jan Bartel 94afd448a6 Merge remote-tracking branch 'origin/jetty-12.0.x-jndi-env-scope' into jetty-12.0.x 2022-07-13 17:18:35 +10:00
Greg Wilkins 7a962e4676 Remove Generic Request/Response #8291
Handle welcome servlets
Handle sendError within dispatcher
2022-07-13 16:58:03 +10:00
Greg Wilkins 13aa9b0bc8 Remove Generic Request/Response #8291
Handle redirection of encoded directory URIs
2022-07-13 16:58:03 +10:00
Greg Wilkins 821d5c8d36 Remove Generic Request/Response #8291
Basic welcome files working
2022-07-13 16:58:03 +10:00
Jan Bartel baca1f2008 Fix quickstart jndi test resources 2022-07-13 15:26:59 +10:00
Jan Bartel 50e2a819f1 Make display names of ee10 demo webapps consistent 2022-07-13 14:09:05 +10:00
Jan Bartel fccf8a9f51 Enable tests 2022-07-13 13:41:17 +10:00
Greg Wilkins 2978472c2b Remove Generic Request/Response #8291
Use HttpFields in request and response
2022-07-13 13:36:51 +10:00
Greg Wilkins ee58d2a51f Remove Generic Request/Response #8291
Use HttpFields in request
2022-07-13 13:05:07 +10:00
Greg Wilkins 4d52f4a704 Re-enabled tests for #8291
Reenabled some tests and started fixing the issues found:
 + Get the correct API context
 + Handle fragments and queries on non slash directory redirection
2022-07-13 13:03:35 +10:00
Jan Bartel 1e30b3ace5 Add ee10 env scope for JNDI 2022-07-13 12:55:19 +10:00
Jan Bartel 825a728d1d Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-ee9-demos 2022-07-13 10:19:43 +10:00
Jan Bartel b6d8bcb7b4 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-ee9-demos 2022-07-13 10:05:35 +10:00
Greg Wilkins 9b1cb302b6
Cleanup Resource.Mount (#8284)
* Introduced the `mountIfNeeded` method to cleanup mount code and reduce checks for "jar:"
 * Fixed Quickstart mounting close.
 * Improved error message
 * Fixed tests for mount cleanup
 * More forgiving newResource(URI) implementation
 * Even more forgiving newResource(URI) implementation
2022-07-13 09:25:14 +10:00
Ludovic Orban be95da326d
Bis: Jetty 12.0.x resource handler and default servlet (#8276)
Made ResourceService use a generic request so it can be used as handler or from servlets.    This is only a temporary solution.

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2022-07-13 09:21:27 +10:00
Olivier Lamy ae77d14cf9
add jetty-ee8-jndi (#8287)
* add jetty-ee8-jndi

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-07-12 20:19:29 +10:00
Jan Bartel 34d21dd1ec WIP get ee9 demos working; fix some ee10 demos 2022-07-12 18:23:37 +10:00
Lachlan Roberts de6e6d16ed fix handling of connection close header during websocket upgrade
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-12 10:46:56 +10:00
Lachlan Roberts 89ba826cb1 save parameters in the core UpgradeRequest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-12 10:46:56 +10:00
Ludovic Orban 23a0203547 rework Resource API (#8106)
* remove Resource.getFile() and replace its usages with Resource.getPath()
* remove all public PathResource ctors + add non-leaky FS mounting mechanism + interpret string as Path when not a schemed URI
* rename Resource.getResource to Resource.resolve, specifying that the subpath is URI-path-interpreted
* remove useless API methods + deprecate all path-related API
* make subpaths beginning with / resolved as relative to the given uri
* introduce filesystem pooling and generalize resource resolving code
* remove URLResource
* remove unneeded factory method
* both file: and jrt: should not be pooled
* move deprecated impls from PathResource down to Resource + fix some tests
* handle Resource's pointing to non-existent jar files
* Force Resource URIs to end with "/" when the resource is a directory
* Produce warning if attempting to release a mounted filesystem uri that doesn't exist in the pool.

Co-authored-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2022-07-12 10:10:30 +10:00
Olivier Lamy 7062db01b1
enable mapping websocket ee9 to ee8 (#8279)
* websocket ee9 to ee8 dynamic generation
* temporary disable tests for jetty-ee8-plus

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-07-11 21:23:44 +10:00
Jan Bartel b521fc4e7e Merge remote-tracking branch 'origin/jetty-12.0.x-enable-distribution-tests-rebase' into jetty-12.0.x 2022-07-09 16:08:36 +10:00
Greg Wilkins 676833e57e
Jetty-12 Improved Content testing and javadoc (#8263)
Improved Content javadoc
Fixed ContentSourceTest that was consuming the same ByteBufferSource multiple times.
Using ByteBufferPool.NOOP instead of allocating NoopByteBufferPool.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2022-07-08 14:52:28 +02:00
Jan Bartel be672f3c91 Disable non-working tests temporarily. 2022-07-08 18:21:52 +10:00
Jan Bartel e31166f333 WIP fix quickstart tests 2022-07-08 12:48:16 +10:00
Greg Wilkins 21165bf74a Fixed compile errors 2022-07-08 11:00:00 +10:00
Greg Wilkins 8322899650 reenable ee10 distribution tests
Signed-off-by:  Jan Bartel <janb@webtide.com>
2022-07-08 09:52:20 +10:00
Greg Wilkins 4c827b986c Minor renaming for clarity
Renamed Blocking to Blocker
Added Handler.Processor.Blocking and Handler.Processor.NonBlocking
2022-07-07 19:38:23 +10:00
Jan Bartel 4e9870eb3a Fix name of ee10 services file 2022-07-07 15:07:02 +10:00
Jan Bartel 8f853f7fb6 Fix pattern to scan for container jars to match servlet api 2022-07-05 11:03:51 +10:00
Jan Bartel a4b9f19e26 Fix injection of AsyncListener 2022-07-05 09:33:21 +10:00
Lachlan Roberts 4e7fa4b943 add changes from merge
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-07-04 17:53:46 +10:00
Jan Bartel fc3fb15dc4 Fix jetty-ee10-demo-jndi/jetty-webapp and ContextProvider 2022-07-04 15:42:17 +10:00
Greg Wilkins 8ecb4b8669 Fixed merge 2022-07-04 12:34:53 +10:00
Greg Wilkins e8f09cb3e0 restored ee10 test
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-07-04 11:43:02 +10:00
Greg Wilkins fd5ae09449 move ee10 test back to ee9
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-07-04 11:38:22 +10:00
Greg Wilkins fe83ea87dc Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-07-04 11:32:33 +10:00
Jan Bartel 07a30cc3e3 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-jndi 2022-06-30 16:39:54 +10:00
Greg Wilkins ea5bedf072
Jetty 12.0.x deployment (#8208)
Deploy webapps for different environments from the same webapps directory.
The maximal environment known to the AppProviders is used as the default environment.
An explicit environment can be set in a properties file for an application, which is also used for property substitution in any context xml file.
2022-06-30 09:51:19 +10:00
Lachlan Roberts c8e6bbdf1b Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-06-29 17:28:06 +10:00
Lachlan Roberts ee02d163c3 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-29 17:22:20 +10:00
Jan Bartel 5c267ce7ed
Jetty 12.0.x eex jettymavenplugin (#8200)
* Fix ee9/10 jetty maven plugin and refactor it tests
2022-06-29 17:18:18 +10:00
Jan Bartel 2a9bf55adb Fix missed renames for ee9/10 tests 2022-06-29 10:53:56 +10:00
Jan Bartel 633c85337c Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-jndi 2022-06-29 10:17:05 +10:00
Jan Bartel e990f0dfbb Fix names of jetty-ee9/10-test submodules 2022-06-29 10:11:42 +10:00
Jan Bartel c7f9ef797b Fix jndi and enable tests 2022-06-29 09:44:05 +10:00
Jan Bartel bfaf0facb5 Reenable ee10 MetaInfConfigurationTest. 2022-06-28 14:09:49 +10:00
Greg Wilkins db3d12f2c4 fix regex test for ee10
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-06-27 12:16:24 +10:00
Lachlan Roberts 6ce10d67f7 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-ee9-websocket 2022-06-24 12:48:30 +10:00
Lachlan Roberts 54358b94e2 re-enable ClientConnectTest for websocket ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-24 11:34:49 +10:00
Lachlan Roberts 3c92cf6fec re-enable WebAppClassLoaderTest for websocket ee9 & ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-24 11:27:19 +10:00
Lachlan Roberts 79385c79b3 re-enable OnMessageReturnTest for websocket ee9 & ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-24 11:25:07 +10:00
Lachlan Roberts 1e532032f3 re-enable LargeAnnotatedTest for websocket ee9 & ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-24 11:23:22 +10:00
Lachlan Roberts ac68dd05a6 re-enable EndpointViaConfigTest for websocket ee9 & ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-24 10:55:02 +10:00
Lachlan Roberts c6206c9b6f re-enable JakartaClientShutdownWithServerWebAppTest for websocket ee9 & ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-24 10:54:05 +10:00
Lachlan Roberts 69b6eb1f3e re-enable ContainerProviderServerTest for websocket ee9 & ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-24 10:50:57 +10:00
Lachlan Roberts 300f219b25 re-enable LargeContainerTest for websocket ee9 & ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-24 10:50:08 +10:00
Lachlan Roberts 8b3a37cfb9 re-enable GracefulCloseTest for websocket ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-24 10:49:07 +10:00
Lachlan Roberts a85e80269b reenable PingPongTest for websocket ee9 and ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-24 10:44:47 +10:00
Lachlan Roberts 82d7bb5669 fix and improve AltFilterTest in websocket ee9 and ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-23 16:15:03 +10:00
Jan Bartel 04e0ee7fe7 Undisable jetty-plus tests; remove unused jetty-plus.xml 2022-06-23 10:09:34 +10:00
Jan Bartel c734008155 Fix eeX jetty-homes generation. 2022-06-22 18:45:33 +10:00
Lachlan Roberts 10ad518da9 fixed websocket JakartaClientClassLoaderTest for ee9 and ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-22 16:59:41 +10:00
Lachlan Roberts be2b231b08 fix websocket IdleTimeoutTest for ee9 and ee10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-22 16:57:01 +10:00
Lachlan Roberts 52d044f742 Merge remote-tracking branch 'origin/jetty-12.0.x-ee9-websocket' into jetty-12.0.x 2022-06-22 13:21:59 +10:00
Jan Bartel 9893c81abf
Jetty 12.0.x update jakarta api versions (#8192)
* update to latest jakarta official releases
2022-06-22 10:32:54 +10:00
Lachlan Roberts 1ee5904450 fix compile errors for ee10 websocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-06-16 17:51:23 +10:00
Jan Bartel eccbfce6dd Rename infinspan-xxx to jetty-infinispan-xxx 2022-06-16 16:31:42 +10:00
Olivier Lamy 09abf2f021
rename ee10-demo to jetty-ee10-demo (#8172)
* rename ee10-demo to jetty-ee10-demo

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-06-16 15:47:08 +10:00
Joakim Erdfelt 89359cc0eb
Removing deprecated jetty-util Log classes 2022-06-15 16:06:51 -05:00
Jan Bartel 5d44ae79e5
Jetty 12.0.x remove taglibjar (#8167)
*Prevent test creating src/main/webapp/WEB-INF/lib/taglib.jar
2022-06-15 15:22:53 +10:00
Greg Wilkins 6b1dfec971 reenabled more ee9 modules 2022-06-15 10:05:56 +10:00
Simone Bordet 77825755cc
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-06-13 15:13:57 +02:00
Lachlan Roberts fd3a0d9123 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-06-10 10:33:29 +10:00
Joakim Erdfelt d1e5ffa4d9
Merge branch 'jetty-11.0.x' into jetty-12.0.x 2022-06-09 09:04:44 -05:00
Jan Bartel 7b62fe95e8 Remove unneeded import 2022-06-07 17:08:49 +10:00
Olivier Lamy 1eaa050163 fix merge
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-06-07 14:11:33 +10:00
Jan Bartel f4e1ef04f9 Fix proxy webapp; fix ContextHandlerCollection.mapContexts 2022-06-07 13:07:16 +10:00
Olivier Lamy 253dc1e577 Merge branch 'jetty-11.0.x' into jetty-12.0.x 2022-06-07 11:18:38 +10:00
Jan Bartel d402995f4d Add missing jetty-ee10-annotations.jar into ee10-annotations.mod 2022-06-06 17:23:35 +10:00
Jan Bartel 38bfb43a05 Implement more of security for ee10 servlets 2022-06-06 17:13:58 +10:00
Jan Bartel f8ae3837c4 Fix resourceBase in MetaInfConfiguration; fix typo in ee10-demo-jetty.xml 2022-06-06 11:32:36 +10:00
Jan Bartel 2a1b68d30f Fix package of servlets in web-fragment.xml 2022-06-06 09:43:58 +10:00
Greg Wilkins a5c438fd29
Rename demo-eeX to eeX-demo (#8097)
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2022-06-06 08:58:09 +10:00
Jan Bartel d9dafa08f0 Merge remote-tracking branch 'origin/jetty-12.0.x-fix-jspinit' into jetty-12.0.x 2022-06-02 13:03:29 +10:00
Jan Bartel b4e59bc4a7 Merge remote-tracking branch 'origin/jetty-12.0.x-fix-servletcontext' into jetty-12.0.x 2022-06-02 13:03:01 +10:00
Jan Bartel ca2fc17e5c Merge remote-tracking branch 'origin/jetty-12.0.x-fix-servletcontext' into jetty-12.0.x-fix-jspinit 2022-06-02 08:46:19 +10:00
Jan Bartel 4043fbd7f2 Make _servletContext final. 2022-06-02 08:45:25 +10:00
Simone Bordet cbeeb67e93
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-06-01 15:18:53 +02:00
Jan Bartel a00280ea9f Fix demo-ee10-jndi/jetty-env.xml 2022-06-01 16:58:59 +10:00
Jan Bartel 4425d20deb Fix ServletHolder.initJsp 2022-06-01 16:56:52 +10:00
Jan Bartel 3b99c8c4e7 WebAppContext and ServletContextHandler must share ServletApiContext instance. 2022-06-01 16:26:36 +10:00
Jan Bartel f6aba98886 Fix websocket modules 2022-06-01 16:25:29 +10:00
Olivier Lamy e7274e3bb1
Add ee8 modules with sources generated from ee9 sources (#8066)
* auto translate some modules from EE9 to EE8

Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-06-01 13:38:42 +10:00
Jan Bartel d69202f3d8 Fix ee10 jsp module 2022-05-31 11:20:24 +10:00
Jan Bartel 4fde2b7769 Merge remote-tracking branch 'origin/jetty-12.0.x-more-modules-enabled' into jetty-12.0.x 2022-05-31 10:40:04 +10:00
Simone Bordet 7a6ccce49a
Rewrite of the content handling, both on client and on server. (#7985)
Introduced a new io.Content class, with Content.Source, Content.Sink and Content.Chunk.

Updated the server-side to use io.Content instead of the previous server-side Content class.
Updated the client-side to use io.Content with a little specialization necessary for clients only.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2022-05-30 13:34:51 +02:00
Jan Bartel 43c662a3ac Fix more ee10 modules. 2022-05-30 18:50:23 +10:00
Greg Wilkins f9b39d932a Reworked BadMessage handling
Throw BadMessage from processing rather than onRequest
2022-05-28 15:49:38 +10:00
Lachlan Roberts 5067351607 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-05-26 15:30:20 +10:00
Jan Bartel 34c51c5dd5 Merge remote-tracking branch 'origin/jetty-12.0.x-deploy-webapps' into jetty-12.0.x 2022-05-26 13:47:38 +10:00
Jan Bartel 570cf12754 WIP fix mvn coords for demo webapp modules 2022-05-26 07:59:52 +10:00
Jan Bartel a5bb51785d WIP rename ee10 demo modules; fix modules 2022-05-25 19:07:18 +10:00
Greg Wilkins 494c06abcb MultiPartParserTest 2022-05-25 18:07:47 +10:00
Jan Bartel eea3a11dd7 WIP deploy ee10 and ee9 webapps. 2022-05-25 17:35:52 +10:00
Greg Wilkins b767ba0dcd Fix ee10 test 2022-05-24 21:06:58 +10:00
Jan Bartel 39c5395fb1 Add --reads org.eclipse.jetty.logging to surefire config 2022-05-24 20:34:13 +10:00
Greg Wilkins 8677f5fac5 Jetty-12 Deploy
Cleanup dump and environment invocation
2022-05-21 09:56:01 +10:00
Greg Wilkins 315600184d Jetty-12 Deploy
hacky fix to dumping attributes
2022-05-20 17:25:21 +10:00
Lachlan Roberts 4bc0316091 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-05-16 14:46:33 +10:00
Jan Bartel 66140afded WIP copy ee9 session tests to ee10 and get them working 2022-05-13 15:26:31 +02:00
Greg Wilkins 22c1a2e901 Fixed webdefault-eeX.xml references 2022-05-13 10:16:06 +02:00
Simone Bordet bfcd7845eb
Fixed references to webdefault.xml that now are webdefault-ee9.xml and webdefault-ee10.xml.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-05-12 17:01:42 +02:00
Joakim Erdfelt 385f00f72b
Merge remote-tracking branch 'jetty-11.0.x' into `jetty-12.0.x` 2022-05-11 16:52:08 -05:00
Greg Wilkins f90e73ddb5 WIP deploying webapps 2022-05-10 00:02:06 +02:00
Olivier Lamy de1c74cdb9 servlet api as well
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-05-09 20:42:47 +10:00
Lachlan Roberts 0de3b48d82 websocket ServerCloseTest has been fixed
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-09 17:16:55 +10:00
Lachlan Roberts af8e89c1b1 implement dummy shutdown method on ContextHandler
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-09 17:14:00 +10:00
Lachlan Roberts 23dcefcd47 copy servlet attributes & params on jetty websocket upgrade
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-09 17:07:48 +10:00
Greg Wilkins 9522fa3d87 Remove ee10 http-spi 2022-05-05 18:57:14 +02:00
Lachlan 6fb717b1b4
Merge pull request #7956 from eclipse/jetty-12.0.x-lachlan
fixes to Jetty 12 for Servlet/WebSocket tests
2022-05-05 15:48:31 +10:00
Lachlan Roberts f40f4095d5 Revert "canonically encode pathspecs"
This reverts commit 83cca5671c.
2022-05-05 13:49:10 +10:00
Lachlan Roberts 83cca5671c canonically encode pathspecs
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-05 09:39:55 +10:00
Lachlan Roberts e7be6f1422 fix bug in ResponseHttpFields
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-05 09:07:15 +10:00
Lachlan Roberts 5fb45f7273 fix WebSocket HttpFieldsWrapper
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-05 08:59:29 +10:00
Lachlan Roberts 1c1847be6f rework and cleanup code for ensureConsumeAllOrNotPersistent
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-05 08:42:18 +10:00
Greg Wilkins 85af234ed6 WIP for deployer 2022-05-04 19:41:38 +02:00
Jan Bartel 30c85c702e WIP move session tests to ee9 before duplicating to ee10 2022-05-04 15:10:13 +02:00
Olivier Lamy ab0bb9911f
change groupId org.eclipse.jetty.ee10 -> org.eclipse.jetty.ee10.websocket for websocket (#7954)
Signed-off-by: Olivier Lamy <oliver.lamy@gmail.com>
2022-05-04 20:35:34 +10:00
Lachlan Roberts 12f443db7d re-enable AsyncContextListenersTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-04 15:30:39 +10:00
Lachlan Roberts 8f981500b8 update SpnegoAuthenticatorTest and fix bug in ConfigurableSpnegoAuthenticator
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-04 14:40:14 +10:00
Lachlan Roberts 686827feaf Fix expectation for ErrorPageTest.testBadMessage()
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-04 14:12:34 +10:00
Lachlan Roberts 3ae3457cb9 fix ErrorHandler exclusion based on HTTP method
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-04 14:11:28 +10:00
Lachlan Roberts 10a9490269 Fix some test cases in ErrorPageTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-04 14:11:12 +10:00
Lachlan Roberts e80a301be3 fix WebSocketListenerTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2022-05-04 14:10:48 +10:00
Greg Wilkins 428a9d568f Reverted to use Resource as BaseResource 2022-05-03 19:28:53 +02:00
Greg Wilkins 0a32147e89 Jetty-12 Restructure
Copied ee10 from hackathon branch

Co-authored-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Jan Bartel <janb@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim@webtide.com>
Co-authored-by: Lachlan Roberts <lachlan@webtide.com>
Co-authored-by: Ludovic Orban <lorban@webtide.com>
Co-authored-by: Olivier Lamy <olamy@webtide.com>
Co-authored-by: Simone Bordet <sbordet@webtide.com>
2022-05-03 15:52:44 +02:00