Commit Graph

88 Commits

Author SHA1 Message Date
Joakim Erdfelt b01e3611cf
Updating to version 12.0.2 2023-10-09 20:59:14 -05:00
Ludovic Orban e290ff9561 #10543 re-instate H3 fix as temporary
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban b9f1fb3187 #10543 make sure drainClearBytesForStream() returns -1 instead of throwing when the stream is finished to avoid a stack overflow
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-09-27 16:44:35 +02:00
Ludovic Orban 344c501940 Merge remote-tracking branch 'origin/jetty-11.0.x' into fix/merge-from-11 2023-09-25 17:40:39 +02: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
Joakim Erdfelt 9c324326c5
Merge `release/12.0.0` back into `jetty-12.0.x` (#10237)
* Updating to version 12.0.0

* Updating to version 12.0.1-SNAPSHOT
2023-08-08 00:55:19 +02:00
Joakim Erdfelt fc37681cbb
Ensure @BeforeEach and @AfterEach are public methods (not protected) 2023-07-31 16:40:21 -05:00
Greg Wilkins 963d33111e
Jetty 12 idletimeout (#9905)
* IdleTimeout review

 + pass TimeoutException through all APIs
 + HttpConnection now passes on TimeoutException to HttpChannel.onFailure
* More ServerTests for idletimeout

* Recreated a ServerTimeoutsTest for multiple transports

* more robust tests

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* merged work from @sbordet and @gregw

* Various improvements to CyclicTimeouts.
* Improved reset of the earliest timeout before iteration.
* Removed check for getExpireNanoTime() == -1, since it's a valid value.
* When onExpired(Expirable) returns false, the Expirable should arrange to move its timeout in the future.

* fix keystore to please BoringSSL + use correct temp path

Signed-off-by: Ludovic Orban <lorban@bitronix.be>

* Fixed ErrorResponseAndCallback succeeded() and failed() to call super.failed() in all cases to complete the wrapped callback.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>

* Revert "Fixed ErrorResponseAndCallback succeeded() and failed() to call super.failed() in all cases to complete the wrapped callback."

This reverts commit 5ac57c13e0.

* WIP idleTimeout

* WIP idleTimeout

* Added context wrapper for idle timeout listener

* updates from review

---------

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>
2023-06-14 09:57:10 +02:00
Simone Bordet df24485000
Various improvements to CyclicTimeouts. (#9897)
* Improved reset of the earliest timeout before iteration.
* Removed check for getExpireNanoTime() == -1, since it's a valid value.
* When onExpired(Expirable) returns false, the Expirable should arrange to move its timeout in the future.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-06-10 17:02:37 +02:00
Ludovic Orban c1f1a6018b Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2023-06-05 17:31:13 +02:00
Simone Bordet 8c4e75bf8d
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-05-28 00:34:49 +02:00
Greg Wilkins 4c16e6a707
Jetty 12 content length 0 take3 (#9740)
* Optimize Content-Length: 0 handling

Create and use a pre-encoded HttpFields.CONTENT_LENGTH_0 constant
Used the constant in more places
renamed the `putLongField` methods of HttpFields.Mutable to just `put`
Fixed wrong docs examples
2023-05-07 19:22:15 +02:00
Greg Wilkins 0ca6295cbc
Rename process to handle (#9385)
Renamed Request.Processor to Request.Handler
Renamed Handler.process to Handler.handle
Renamed Rule.Processor to Rule.Handler.
Renamed accordingly methods and variable.
Updated comments accordingly.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
2023-02-16 18:21:12 +01:00
gregw a15af55a56 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
Signed-off-by: gregw <gregw@webtide.com>
2023-02-15 15:31:33 +11: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 9916706b5f
Issue #9293 - Jetty 12 - Relax JPMS dependencies (quic) (#9307)
Relaxed jetty-quic JPMS dependencies.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2023-02-04 14:38:33 +01:00
Ludovic Orban b1739aca53 Catch unchecked exceptions / errors thrown during produce to avoid letting the stack trace be logged by the execution strategy
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2023-02-02 10:42:20 +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
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 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 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
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
Simone Bordet 346a59197b
Merged branch 'jetty-11.0.x' into 'jetty-12.0.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-12-01 18:04:54 +01:00
Ludovic Orban 12e48a7241 replace FSM with SerializedInvoker
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-11-29 09:31:49 +01: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
Simone Bordet 72d2724906
Fixed build with Java 17+.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2022-10-27 11:40:37 +02:00
Ludovic Orban b10e25b683 Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x 2022-10-18 09:30:37 +02:00
Ludovic Orban 3e78f82c9e Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-10-10 19:21:01 +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
Ludovic Orban fe2bcf9543 #8613: the current quiche-foreign-incubator implementation only works with JDK 17, so disable it on other JDKs
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2022-09-23 18:26:40 +02: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
Simone Bordet be2d4ef069
Jetty 12 module renaming - jetty-quic.
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
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
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
Greg Wilkins 04acdb72f0 Jetty-12 Restructure
Copied over non ee10 components from the 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:50:54 +02:00
Greg Wilkins 825fa75993 Jetty-12 Restructure
Git moved files into their known new locations

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:46:22 +02:00