Commit Graph

349 Commits

Author SHA1 Message Date
gregw a6125e40f0 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.1.x 2024-09-18 07:17:52 +10:00
Greg Wilkins dc43f3d498
Optimize request buffer release #12239 (#12240)
Release request buffer before handling when there is no content

---------

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2024-09-18 07:11:32 +10:00
Joakim Erdfelt 044a3be744
Merge pull request #12245 from jetty/release/12.0.13
Merge back release 12.0.13
2024-09-11 09:45:12 -05:00
gregw fda0408e38 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.1.x
# Conflicts:
#	jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java
2024-09-06 14:18:20 +10:00
Olivier Lamy f0a1db100f
Jetty 12.0.x Add jdk23 build (fix javadoc breaking with 23) (#12238)
* add jdk23 build
* make jdk23 happy with javadoc
---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-09-06 10:57:42 +10:00
Lachlan 8c5d5e8a15
Merge pull request #12186 from jetty/jetty-12.1.x-servletUpgrade
implement servlet upgrade for ee10 and ee11
2024-09-05 08:23:16 +10:00
Olivier Lamy 65e9bba44c
next snapshot
Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-09-03 21:44:43 +10:00
Olivier Lamy 816018a420
Updating to version 12.0.13 2024-09-03 13:03:43 +10:00
Lachlan Roberts f795fb10d0
PR # 12186 - changes from review
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
2024-09-02 15:52:53 +10:00
Simone Bordet 4ee55c2a4d
Merged branch 'jetty-12.0.x' into 'jetty-12.1.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-30 12:12:52 +02:00
Simone Bordet 1726c8778c
Fixes HttpClient Content.Source reads from arbitrary threads (#12203)
* Reworked HttpReceiverOverHTTP state machine, in particular:
** Introduced a boolean parameter to parseAndFill() and parse(), that specifies whether to notify the application demand callback.
   This is necessary because reads may happen from any threads, and must not notify the application demand callback.
   Only when there is no data, and fill interest is set, then the application demand callback must be notified.
** Removed action field to avoid lambda allocation.
** Now the application is called directly from the parse() method.
** Reading -1 from the network drives the parser by calling again parse(), rather than the parser directly.
  This allows to have a central place to notify the response success event.

* Fixed FastCGI similarly to HTTP/1.1.
* Removed leftover of the multiplex implementation.

* Fixed test flakyness in `NetworkTrafficListenerTest`: consume the request content before sending the response.

* Follow up after #10880: only abort the request if there is request content in `AuthenticationProtocolHandler` and `RedirectProtocolHandler`.
  This avoids the rare case where the response arrives before the request thread has modified the request state, even if the request has been fully sent over the network, causing the request to be failed even if it should not.

* added `SerializedInvoker` assertions about current thread invoking.
* Name all SerializedInvoker instances for better troubleshooting.

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>
2024-08-30 12:01:43 +02:00
Lachlan Roberts b6f2c869e5
PR #12186 - Make HttpConnection internal and implement a public Upgrade interface
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
2024-08-29 11:44:22 +10:00
Lachlan Roberts cb691cd3ff
PR #12186 - deprecate servletUpgrade method on HttpParser and rename to upgrade()
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
2024-08-23 14:07:05 +10:00
Lachlan Roberts a9d391079c
implement servlet upgrade for ee10 and ee11
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
2024-08-21 23:42:50 +10:00
gregw 2ba2250ac8 updates from review
introduce default buffer size constant
2024-08-07 10:37:24 +02:00
Ludovic Orban 347dee0ba5 - Replace ByteBufferPool + size + directness with ByteBufferPool.Sized in HttpContent-related code
- Cleanup and javadoc HttpContent
 - Align and cleanup offset/length default values

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-08-07 10:37:24 +02:00
Joakim Erdfelt 9261ed948c
Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.1.x 2024-08-03 05:31:24 -05:00
gregw 385d943b0c Fix #12104 Empty Connection Header
Fix #12104 by better handling of `close` and `keep-alive` values in the HttpGenerator, so that we never add an empty field.
2024-08-02 14:26:42 +10:00
Simone Bordet 87324a70b6
Fixes #11926 - Authority Customizer. (#12066)
Fixes #11926 - Authority Customizer.

Introduced AuthorityCustomizer to synthesize the authority from the Host header (or serverName:serverPort), and related documentation.

Removed additional check on authority's host in `HttpCompliance`, as it was too strict and in the wrong place (authority checks should be factored out elsewhere for all HTTP protocol versions).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-07-30 16:52:55 +02:00
Joakim Erdfelt 497fbf7137
Merge remote-tracking branch 'origin/release/12.0.12' into jetty-12.0.x 2024-07-30 09:21:30 -05:00
Basil Crow a1e90fe6b0
Add missing font MIME types (#12098) 2024-07-28 02:18:25 +02:00
Basil Crow b61e8d82e7
Update `smil` MIME type (#12096) 2024-07-28 09:21:26 +10:00
Basil Crow 05d638da35
Use `text/troff` MIME type (#12095) 2024-07-28 09:21:05 +10:00
Joakim Erdfelt d3af12957b
Updating to version 12.0.13-SNAPSHOT 2024-07-25 17:23:21 -05:00
Joakim Erdfelt cc6f1b74db
Updating to version 12.0.12 2024-07-25 16:57:59 -05:00
Ludovic Orban a9a0f164ca
cleanup and javadoc HttpContent (#12069)
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-07-25 11:59:19 +10:00
Jan Bartel 37fbd4167c Issue #12086 change mimetype of .ico resource to vnd.microsoft.icon 2024-07-25 08:18:05 +10:00
Ludovic Orban 834db77605
Implement HttpContent.writeTo() async API (#12020)
#8790 implement HttpContent.writeTo() async API

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-07-24 14:07:31 +02:00
gregw 8735fee1dd Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.1.x
# Conflicts:
#	documentation/jetty-asciidoctor-extensions/pom.xml
#	documentation/jetty-documentation/pom.xml
#	jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java
#	jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/ResponseTest.java
2024-07-10 09:20:02 +10:00
Greg Wilkins c880d9309b
Added a `UriCompliance.Violation.USER_INFO` to deprecate user info in `HttpURI` (#12012)
As per [RFC9110](https://datatracker.ietf.org/doc/html/rfc9110#name-deprecation-of-userinfo-in-) user info is deprecated in server implementations.
The new violation for USER_DATA is included by default in 12.0.x, but will be removed in 12.1.x
2024-07-10 09:02:55 +10:00
Joakim Erdfelt f5abe07ade
Updating to version 12.0.12-SNAPSHOT 2024-06-27 19:09:24 -05:00
Joakim Erdfelt 9f90cedce3
Updating to version 12.0.11 2024-06-27 18:42:08 -05:00
Joakim Erdfelt c7ad22e861
Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.1.x 2024-06-27 06:45:25 -05:00
Lachlan f21bbcf40f
Merge pull request #11906 from jetty/jetty-12.0.x-coreMultiPart
Improve support for MultiPart in jetty-core
2024-06-26 12:57:35 +10:00
Joakim Erdfelt f78f4422f5
Issue #11925 - Fix Etag NPE when using URLResource and improve Base Resource is alias warning (#11930)
* Issue #11925 - ee9 DefaultServlet and suffix url-patterns.
* Issue #11925 - Fix NPE in EtagUtils with URLResource
* Issue #11925 - Make error message "Base Resource should not be an alias" more useful.
* Set <reuseForks> to false for problematic tests.
2024-06-25 08:11:35 -05:00
gregw d818a98cba Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.1.x
# Conflicts:
#	jetty-core/jetty-io/src/main/java/org/eclipse/jetty/io/Content.java
#	jetty-ee10/jetty-ee10-servlet/src/test/java/org/eclipse/jetty/ee10/servlet/ContextScopeListenerTest.java
2024-06-25 15:19:32 +10:00
Greg Wilkins 718c6fce51
Content.Source from methods (#11949)
Introduce Content.Source.from methods
These isolate code from specific implementations (which could even be made internal)
2024-06-25 12:32:29 +10:00
gregw 4228f8e76b Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.1.x 2024-06-25 09:32:38 +10:00
Greg Wilkins 36538d6e69
RetainableByteBuffer as mutable (#11801)
Tweaks to the RBB API to make the concept more uniform throughout the codebase.

* Make chunk a RBB
* Added Dynamic RBB as a replacement for both Accumulator and Aggregator

---------

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2024-06-25 08:12:41 +10:00
Joakim Erdfelt 930ebc4b31
Merge pull request #11945 from jetty/fix/12.0.x/multipart-part-delete-existence-check
Issue #11944 - Part.delete() should only attempt to delete if the file exists
2024-06-24 07:23:48 -05:00
Lachlan Roberts af0902fdcf Issue #11906 - change default of useFilesForPartsWithoutFileName to true
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-06-24 15:36:17 +10:00
Lachlan Roberts c845b553fb Issue #11906 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-06-24 15:32:13 +10:00
Greg Wilkins 4f4bec0624
ByteChannelContentSource (#11910)
Introduces a ByteChannelContentSource which is needed for the spring framework integration.

It also introduces a few minor utilities:

a ByteBufferPool.Sized class that is a ByteBufferPool.Wrapper with a configured size and type so a no args acquire() method can be called. This avoid the need to many classes to have a three fields: pool, size and direct and also can avoid constructors/methods with size and direct
an ExceptionUtil.run(Runnable, Consumer<Throwable> failure) that is a simple try catch and avoids many private methods being created to do just that.
2024-06-24 14:35:23 +10:00
Lachlan Roberts c7249c7156 Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-coreMultiPart 2024-06-24 12:44:22 +10:00
Lachlan Roberts 9de9a487e1 PR #11906 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-06-24 12:43:55 +10:00
Lachlan Roberts 4a33439a8f PR #11906 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-06-24 11:48:11 +10:00
Greg Wilkins 1e241d8ed5
Servlet 61 cookie fixes (#11936)
* Fix #11934 Servlet 6.1 Cookies
* Added compliance mode MAINTAIN_QUOTES to keep the quotes as part of the cookie value.  Added mode RFC6265_QUOTED that includes this violation
* Never send a zero valued max-age parameter
* Partitioned is set if any attribute that is not "false" is set.
* Avoid equal sign for empty valued attributes
* Pushed responses delete max-age==0 cookies
2024-06-23 13:13:18 +10:00
Joakim Erdfelt 9f077aaeb3
Issue #11944 - Part.delete() should only attempt to delete if the file exists. 2024-06-21 13:40:06 -05:00
Lachlan Roberts 65fa7afc77 PR #11906 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2024-06-20 12:40:21 +10:00
Joakim Erdfelt af23f51d92
Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.1.x 2024-06-19 16:18:15 -05:00