Commit Graph

758 Commits

Author SHA1 Message Date
Olivier Lamy 8ba5ff1e9c
Issue #10688 add Jetty 12.0.x ee8 osgi (#10711)
* Add OSGi for ee8 environment

Signed-off-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Jan Bartel <janb@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-10-26 20:23:52 -05:00
Joakim Erdfelt 04475daf60
Issue #10794 - fixing Moved Permanently handling of query strings 2023-10-26 11:35:52 -05:00
Jan Bartel a5f06fceaf
Add ability to compress and skip unserializable session attributes (#10747)
* Add ability to compress and skip unserializable session attributes
2023-10-26 09:36:45 +02:00
Jan Bartel 3ae43961b8
Jetty 12.0.x overlay combined resources (#10760)
* Fix overlays with CombinedResource
* Improvements to CombinedResource for AnnotationParser
* Added `contains` and `getPathTo` methods to the Resource API, so they can be used by the AnnotationParser
* Fixed numerous bugs in CombinedResource list and getAllResources
* handles cross file system copy as well.
* Reduced fallback to URI string manipulation.

---------

Co-authored-by: gregw <gregw@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-10-26 07:49:48 +11:00
Simone Bordet f12d568e0b
Improvements to the description section.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-25 12:19:09 +02:00
Lachlan Roberts d91905ca18 remove remaining references to PushCacheFilter
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-10-25 16:48:42 +11:00
Lachlan Roberts 829e2a19b7 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-10-25 16:35:42 +11:00
Greg Wilkins 14152c425b
Better handling of Objects in JMX MetaData (#10762)
* Send attributes as Map<String,String>
* JMX-annotated ErrorHandler, fixed usage of showMessageInTitle and removed showServlet.
* JMX-annotated Request.Handler.
* Added JMX test module to test improvements to JMX.

Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-24 10:03:28 +11:00
Jan Bartel 14a5ba3489
Issue #10661 Allow jetty api to override servlets and mappings from webdefault (#10668)
* Issue #10661 Allow jetty api to override servlets and mappings from webdefault

---------

Co-authored-by: Greg Wilkins <gregw@webtide.com>
2023-10-19 08:35:44 +02:00
gregw 524bde565e Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
# Conflicts:
#	jetty-ee10/jetty-ee10-servlets/src/test/java/org/eclipse/jetty/ee10/servlets/AbstractDoSFilterTest.java
#	jetty-ee9/jetty-ee9-servlets/src/main/java/org/eclipse/jetty/ee9/servlets/DoSFilter.java
2023-10-19 09:24:30 +11:00
Olivier Lamy f2ab447c4f
Merge 11 to 12 Issue #10731 wrong context attribute name javax.servlet instead of jakarta.servlet (#10735) and Address build/test failure against bad entities. (#10742) (#10745)
* Issue #10731 wrong context attribute name javax.servlet instead of jakarta.servlet (#10735)

* Issue #10731 wrong context attribute name javax.servlet instead of jakarta.servlet

Signed-off-by: Olivier Lamy <olamy@apache.org>

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

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

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

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

* fix javadoc

Signed-off-by: Olivier Lamy <olamy@apache.org>

* more usage of constant

Signed-off-by: Olivier Lamy <olamy@apache.org>

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>

* Address build/test failure against bad entities. (#10742)

Bad entities in test case can lead to:

* external URL references
* required HTTP GET requests
* not testing redirectEntity / resolveEntity
  (the whole point of the test)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

* use constant

Signed-off-by: Olivier Lamy <olamy@apache.org>

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2023-10-17 07:29:13 +02:00
Greg Wilkins ffe80cd1f2
MutableHttpFields.asImmutable avoids copy (#10651)
* Avoid a copy in MutableHttpFields.asImmutable if the mutable is never mutated again.
* reduce instance creations needed for iterations
---------
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-10-17 08:58:19 +11:00
Jan Bartel fffbab015d
Jetty 12.0.x 10582 servlethttpwrapper (#10587)
* Issue #10582 fix DispatcherTest use of ServletRequestWrapper
2023-10-12 07:46:04 +02:00
Olivier Lamy fcc88274a4
Jetty 12.0.x use automatic formatter for poms to have same style for every poms (#10578)
* apply spotless sort pom

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-10-12 03:51:36 +02:00
Joakim Erdfelt 6b3f760b80
Updating to version 12.0.3-SNAPSHOT 2023-10-09 21:16:46 -05:00
Joakim Erdfelt b01e3611cf
Updating to version 12.0.2 2023-10-09 20:59:14 -05:00
Simone Bordet 3458f0ef13
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-10-09 20:06:48 +02:00
Olivier Lamy 8bdf42f652
Issue #7408 fix scope of Maven plugins dependencies and re enable some IT tests (#10660)
* Issue #7408 fix scope of maven dependencies for ee10
* Issue #7408 fix scope of maven dependencies for ee10 jspc and restore it test which were disabled
* Issue #7408 fix scope of maven dependencies for ee9 maven plugin
* Issue #7408 fix scope of maven dependencies for ee9 jspc and restore it test which were disabled
* Issue #7408 fix scope of maven dependencies for ee8 maven plugin
* Issue #7408 fix scope of maven dependencies for ee8 jspc and restore it test which were disabled

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-10-06 02:10:07 +02:00
Greg Wilkins 8331809c40
Fix getCharacterEncoding issue with #10563 (#10650)
Do not persist a defaulted charset used in the request.
Throw `UnsupportedEncodingException` from `getReader`
2023-10-03 12:45:40 +11:00
Greg Wilkins 1a207dbeea
An omnibus PR for changes needed to support webfunctions (#10563)
Web functions are currently supported with servlets. These changes add/move utility classes to core to better support direct usage of core APIs
 * increase usage of Charset in request
 * Added flush mechanism to BufferedContentSink
2023-09-27 09:29:15 +10:00
Olivier Lamy b945ca6e40
Issue #10421 fix jpms warning (#10424)
* remove wrong jpms declaration

Signed-off-by: Olivier Lamy <olamy@apache.org>

* remove non valid jpms sections from mod files

Signed-off-by: Olivier Lamy <olamy@apache.org>

* more cleanup

Signed-off-by: Olivier Lamy <olamy@apache.org>

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-09-26 09:33:41 +10:00
Olivier Lamy 49d194db6d
remove wrong directory (#10571)
* remove wrong directory
* fix by using test-classes

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-09-24 00:02:19 +02:00
Jan Bartel 65d5664ef4
Issue #10558 Fix ee10 redirect during forward, add ee9 test (#10560)
* Issue #10558 Fix ee10 redirect during forward, add ee9 test
2023-09-23 03:52:08 +02:00
Jan Bartel 0e79cc8cb3
Issue #10466 review session documentation. (#10497)
* Issue #10466 review session documentation.

Also fix session config context init param names and add missing code to
configure SessionHandler via context init params, and added test for
config.
2023-09-22 08:18:29 +02:00
Greg Wilkins 57b953be67
Reintroduce an Exception type for invalid UTF-8 (#10553)
Introduce `Utf8CharacterCodingException`  and `Utf8IllegalArgumentException` as a substitutes for the removed `Utf8Appendable.NotUtf8Exception`.

* Updates from review
2023-09-22 12:24:42 +10:00
Jan Bartel 9bfa5cc65e
Issue #10463 Fix lastModified header when using HttpServletResponseWrapper (#10556)
* Issue #10463 Fix lastModified header when using HttpServletResponseWrapper
2023-09-21 05:49:54 +02:00
Lachlan 42468ae1bd
Merge pull request #10494 from eclipse/jetty-12.0.x-10490-websocketServerUpgradeRequest
Issue #10490 - fixes and testing for websocket JakartaServerUpgradeRequest
2023-09-21 11:46:28 +10:00
Joakim Erdfelt aefa331aa4
Issue #10328 - Review ResourceFactory.newSystemResource (#10533)
* Issue #10328 - Review ResourceFactory.newSystemResource

+ Create a new ResourceFactory.newClassLoaderResource(String, boolean)
+ Make .newSystemResource(String) use it
+ Make .newClassPathResource(String) use it
+ Deprecate .newSystemResource(String)
+ Deprecate .newClassPathResource(String)
+ Adjust own codebase to not use deprecated methods
2023-09-20 16:43:22 -05:00
Lachlan Roberts 665cae2ec2 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-10490-websocketServerUpgradeRequest 2023-09-21 07:24:08 +10:00
Simone Bordet d1a1663b39
Fixes #10324 - Improve migration from Servlets to Handler. (#10529)
* Using request.getLength() instead of looking up the Content-Length header.
* Jetty Handler vs Servlet pros.
* Using CompletableFuture (not Promise) in examples.
* Removed unused cruft from tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-20 21:15:20 +02:00
Greg Wilkins 09710c7cb6
Fix jetty 12 javadoc (#10527)
Fixes for javadoc warnings
2023-09-18 17:30:02 +10:00
Greg Wilkins 4e27d308df
Fix parsing of JSESSIONID only (#10479)
Improved parsing of JSESSIONID cookies and jsessionid parameters.
Better handling of invalid and duplicate session IDs

Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Jan Bartel <janb@webtide.com>
2023-09-18 17:27:28 +10:00
gregw fb80522675 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-09-18 17:25:11 +10:00
Olivier Lamy 927546309e
do not run this in parallel as some conflicted jdni entries with ServerWithJNDITest (#10526)
Signed-off-by: Olivier Lamy <olamy@apache.org>
2023-09-15 08:37:19 +02:00
Simone Bordet 049cf3a334
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-14 20:01:13 +02:00
Simone Bordet 530ed33611
Fixes #10219 - Review HTTP Cookie parsing (#10464)
* Added SetCookieParser interface and RFC6265SetCookieParser implementation to properly parse Set-Cookie values.
* Removed hacky implementation in HttpClient.
* Removed unused methods in HttpCookieUtils.
* Using SetCookieParser for the implementation of newPushBuilder in ee9,ee10.
* Reworked HttpCookieStore.Default implementation.
* Implemented properly cookie path resolution.
* Using URI.getRawPath() to resolve cookie paths.
* Removed secure vs. non-secure scheme distinction when storing cookies.
* Refactored common code in HttpCookieStore.Default to avoid duplications.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-14 17:13:05 +02:00
Simone Bordet 388d3e38fa
Fixes #10361 - Introduce QoSHandler (#10480)
* Introduced QoSHandler.
* Updated documentation, and removed old documentation.
* Now using dynamic max priority.
The current implementation retains priorities and queue as they are created, but hopefully the priority range is constrained.
* Better algorithm for resuming: rather than releasing a permit and try to acquire it again, keep the permit and resume a request.
This also removes the issue that a request could have been suspended again, therefore remaining suspended much more than maxSuspend.
* Deprecated QoSFilters in ee10 and ee9.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-14 15:46:12 +02:00
Simone Bordet 8684b0a67a
Introduced CompletableResponseListener (#10502)
Introduced CompletableResponseListener, a replacement for FutureResponseListener that uses better APIs based on CompletableFuture.

Deprecated FutureResponseListener and replaced its usages.

Updated documentation.

Added tests for zipped request content.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-09-14 15:33:51 +02:00
Lachlan Roberts c81325492a Issue #10498 - fixes for getUserPrincipal in Jetty WebSocket EE9 & EE10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-09-14 10:26:02 +10:00
Lachlan Roberts 4bdd21f777 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-10490-websocketServerUpgradeRequest 2023-09-14 09:57:50 +10:00
Lachlan Roberts 3066737016 Issue #10490 - fixes and testing for websocket JakartaServerUpgradeRequest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2023-09-11 17:00:02 +10:00
Olivier Lamy 004da47cb5
Merge 11.0.x back to 12.0.x (#10472)
* Bump org.infinispan.protostream:protostream

Bumps [org.infinispan.protostream:protostream](https://github.com/infinispan/protostream) from 4.6.2.Final to 4.6.4.Final.
- [Release notes](https://github.com/infinispan/protostream/releases)
- [Commits](https://github.com/infinispan/protostream/compare/4.6.2.Final...4.6.4.Final)

---
updated-dependencies:
- dependency-name: org.infinispan.protostream:protostream
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump apache.directory.api.version from 2.1.3 to 2.1.4

Bumps `apache.directory.api.version` from 2.1.3 to 2.1.4.

Updates `org.apache.directory.api:api-ldap-schema-data` from 2.1.3 to 2.1.4

Updates `org.apache.directory.api:api-ldap-model` from 2.1.3 to 2.1.4

Updates `org.apache.directory.api:api-util` from 2.1.3 to 2.1.4
- [Commits](https://github.com/apache/directory-ldap-api/compare/2.1.3...2.1.4)

Updates `org.apache.directory.api:api-asn1-api` from 2.1.3 to 2.1.4

---
updated-dependencies:
- dependency-name: org.apache.directory.api:api-ldap-schema-data
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.api:api-ldap-model
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.api:api-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.api:api-asn1-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump org.wildfly.security:wildfly-elytron

Bumps [org.wildfly.security:wildfly-elytron](https://github.com/wildfly-security/wildfly-elytron) from 2.2.1.Final to 2.2.2.Final.
- [Commits](https://github.com/wildfly-security/wildfly-elytron/compare/2.2.1.Final...2.2.2.Final)

---
updated-dependencies:
- dependency-name: org.wildfly.security:wildfly-elytron
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump pax.url.version from 2.6.2 to 2.6.14

Bumps `pax.url.version` from 2.6.2 to 2.6.14.

Updates `org.ops4j.pax.url:pax-url-aether` from 2.6.2 to 2.6.14
- [Commits](https://github.com/ops4j/org.ops4j.pax.url/compare/url-2.6.2...url-2.6.14)

Updates `org.ops4j.pax.url:pax-url-wrap` from 2.6.2 to 2.6.14
- [Commits](https://github.com/ops4j/org.ops4j.pax.url/compare/url-2.6.2...url-2.6.14)

---
updated-dependencies:
- dependency-name: org.ops4j.pax.url:pax-url-aether
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.ops4j.pax.url:pax-url-wrap
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* exclude banned dependencies

Signed-off-by: Olivier Lamy <olamy@apache.org>

* Bump org.infinispan.protostream:protostream (#10469)

Bumps [org.infinispan.protostream:protostream](https://github.com/infinispan/protostream) from 4.6.4.Final to 4.6.5.Final.
- [Release notes](https://github.com/infinispan/protostream/releases)
- [Commits](https://github.com/infinispan/protostream/compare/4.6.4.Final...4.6.5.Final)

---
updated-dependencies:
- dependency-name: org.infinispan.protostream:protostream
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix version number

Signed-off-by: Olivier Lamy <olamy@apache.org>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 13:05:28 +10:00
Joakim Erdfelt a415da73df
Merge remote-tracking branch 'origin/jetty-11.0.x' into fix/12.0.x/merge-from-11 2023-08-31 16:06:14 -05:00
Joakim Erdfelt ef51c4277e
Adding <extraArtifacts> for jetty-ee9-maven-plugin integration tests
+ jetty-slf4j-impl needed by IT specific maven repo
2023-08-31 15:08:18 -05:00
Joakim Erdfelt 1d226403da
Updating to version 12.0.2-SNAPSHOT 2023-08-29 16:55:36 -05:00
Joakim Erdfelt 4768745849
Updating to version 12.0.1 2023-08-29 16:38:20 -05:00
Simone Bordet c638753b8d Fixes #10293 - Improve documentation on how to write a response body in Jetty 12.
Updated documentation about:
* Content.Source
* Content.Sink
* Handler
* Request/Response

Updated few APIs to make easier to write applications.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-08-29 22:07:42 +02:00
Jan Bartel 5808a62660
Issue #10356 Update Weld integration (#10359)
* Issue #10356 Update Weld integration

Signed-off-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Olivier Lamy <olamy@apache.org>
2023-08-29 11:00:50 +02:00
Greg Wilkins e3ee84a5ad
Fix #10416 Do not copy ee9 response headers (#10417)
Use the core response HttpFields directly as the ee9 response headers to avoid copy and retain persistent field behaviour.
Fix #10416 EE9 Response headers
Added EE9 test to show that Persistent fields can be modified
Updated fix for #10339 so that persistent fields revert to original values after a clear operation
2023-08-29 08:31:02 +10:00
Lachlan 9e0cd71b31
Merge pull request #10391 from eclipse/jetty-12.0.x-10385-GzipDefaultServletTest
Issue #10385 - fix NPE in GzipDefaultServletTest
2023-08-25 15:46:24 +10:00