Commit Graph

29992 Commits

Author SHA1 Message Date
Ludovic Orban ed1cadc449
fix npe when onCompleteFailure happens after reset (#12199)
Fix npe when onCompleteFailure happens after reset

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2024-08-28 19:43:54 +02:00
Greg Wilkins aa07995f37
sendError(-1) is an abort (#12206)
restore behaviour from jetty <= 11 where a sendError(-1) is a true abort, without an attempt to send an error response.
2024-08-28 20:24:10 +10:00
Olivier Lamy edbd21bdf0
Issue #11322 Upgrade to mongodb-driver-sync 5.x (#11681)
Upgrade to mongodb driver async 5.x

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-08-28 18:09:15 +10:00
gregw 1bf074894a Merge branch 'fork/Tony-the-Tech/fix/12.0.x/SslContextFactory_use_credential' into jetty-12.0.x
Updated with call to check if old behaviour has been extended.
2024-08-28 09:13:22 +10:00
Simone Bordet 0420e926a1
Fixes #12171 - QoSHandler does not resume on a virtual thread. (#12174)
Now QoSHandler resumes requests using Request.getComponents().getExecutor().
This Executor is configured to be the virtual thread executor, if present, otherwise the Server Executor.

Removed warn() from VirtualThreads.isVirtualThread(), as it was too verbose.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-27 10:03:48 +02:00
Joakim Erdfelt 394bc136f3
Merge pull request #12198 from jetty/jetty-12.0.x-VirtualThreadPoolSemaphore
Fix potential NPE from VirtualThreadPool
2024-08-26 10:49:37 -05:00
Joakim Erdfelt 4fd306fcc2
Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-VirtualThreadPoolSemaphore 2024-08-26 09:01:06 -05:00
Simone Bordet 0f28d47597
Fixed assertion mismatch between int and long.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-26 11:52:55 +02:00
Simone Bordet 0a56509130
Fixes #11822 - HTTP/2 responses exceeding SETTINGS_MAX_HEADER_LIST_SIZE do not result in RST_STREAM or GOAWAY. (#12165)
Now HpackException.SessionException is treated specially in HTTP2Flusher.
It is caught, it fails all the entries, and then tries to send a GOAWAY, which will be the only frame allowed into the HTTP2FLusher at that point.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-26 11:33:17 +02:00
Simone Bordet b13f3ccc15 Documented Jetty versions and compatibilities, and code deprecation policy.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-26 12:31:10 +03:00
Simone Bordet 930d91568a
Fixes #9121 - Flaky BlockedWritesWithSmallThreadPoolTest.testServerThreadsBlockedInWrites(). (#12178)
The test uncovered a larger problem detailed in the issue: the Handler Callback should be non-blocking.

Since all implementations of HttpStream are non-blocking, overridden HttpStream.getInvocationType() to return NON_BLOCKING.

This guarantees that even in case of all server threads blocked, blocked/pending writes can be completed.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-26 11:12:38 +02:00
Simone Bordet 21f2f2acea
Fixes #3553 - Support sslSession() in Jetty Client. (#12179)
Implemented Connection.getSslSessionData(), where the Connection can be obtained from the Request:
request.getConnection().getSslSessionData().

Updated documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-26 11:10:04 +02:00
Lachlan Roberts 8464340f07
Fix potential NPE from VirtualThreadPool
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
2024-08-26 12:36:53 +10:00
Tony Copping 66e4bd862f Issue #12175 Updates based on feedback
Signed-off-by: Tony Copping <tony@sigsoft.ca>
2024-08-24 10:05:01 -06:00
Simone Bordet bb52d95a62
Fixes #12063 - Introduce Jetty module for HTTP/2 client dependencies. (#12170)
Introduced http2-client.mod and http2-client-transport.mod.
These modules download dependencies via a [files] section.
They can be used to have the server provide the dependencies in case of a web application proxies request using HTTP/2.

Fixed ContentProvider to set the context ClassLoader before reading the Jetty XML context file, which may reference classes from the web application.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-23 16:33:51 +02:00
Simone Bordet 6527aa559b
Merged branch 'pbhenson-response-header-rule' into 'jetty-12.0.x'. 2024-08-23 12:10:38 +02:00
Simone Bordet cc469a136d
Code/Import cleanups.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-23 12:01:16 +02:00
Simone Bordet 01ce4dbe64
Limited max suspended requests to 1024 by default.
Javadocs, comment and logging improvements.
Simplified test case.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-23 11:59:31 +02:00
Lars Krog-Jensen 034493ad7f
Issue #12185 code formatting 2024-08-23 11:59:31 +02:00
Lars Krog-Jensen 994012e7eb
Issue #12185 Custom FJP in unit test and more white space formatting 2024-08-23 11:59:30 +02:00
Lars Krog-Jensen f37a4a167b
Issue #12185 white space formatting and increase delay to avoid flaky tests 2024-08-23 11:59:30 +02:00
Lars Krog-Jensen 32652e88bc
Issue #12185 code formatting 2024-08-23 11:59:30 +02:00
Lars Krog-Jensen b7591d546f
Issue #12185 implementation/test of max suspended requests in QoSHandler 2024-08-23 11:59:30 +02:00
Jan Bartel dbb982108b
Fix order of jetty.http.port property for jetty maven plugin (#12183) 2024-08-23 11:59:30 +02:00
Simone Bordet 9f08dc3050
Fixes #12154 - Limit concurrent virtual threads. (#12155)
Updated VirtualThreadPool to limit the number of concurrent virtual threads using a Semaphore.

Updated modules and documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-23 11:59:30 +02:00
Olivier Lamy ba4cc396eb
change urls https://eclipse.dev to https://jetty.org (#12172)
* change urls https://eclipse.dev to  https://jetty.org

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-08-23 11:59:29 +02:00
Simone Bordet 185b423e1a
Merged branch 'LarsKrogJensen-issue-12185' into 'jetty-12.0.x'. 2024-08-23 11:33:16 +02:00
Simone Bordet aae0a55104
Limited max suspended requests to 1024 by default.
Javadocs, comment and logging improvements.
Simplified test case.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-23 11:31:11 +02:00
Jan Bartel dc41ad90ab
Fix order of jetty.http.port property for jetty maven plugin (#12183) 2024-08-23 10:50:57 +02:00
Paul B. Henson d4dbece1af Add new rewrite rule to return response status code based on matching header values 2024-08-22 17:22:50 -07:00
Lars Krog-Jensen 30791c16ee Issue #12185 code formatting 2024-08-22 12:18:02 +02:00
Lars Krog-Jensen 7976e75b11 Issue #12185 Custom FJP in unit test and more white space formatting 2024-08-22 12:07:32 +02:00
Lars Krog-Jensen 6868c34bdf Issue #12185 white space formatting and increase delay to avoid flaky tests 2024-08-22 11:28:34 +02:00
Lars Krog-Jensen 7aa4c79ab7 Issue #12185 code formatting 2024-08-22 10:58:51 +02:00
Lars Krog-Jensen 497da2da0a Issue #12185 implementation/test of max suspended requests in QoSHandler 2024-08-22 10:32:29 +02:00
Jan Bartel 36ec04f92e
Fix order of jetty.http.port property for jetty maven plugin (#12183) 2024-08-22 18:19:44 +10:00
Simone Bordet 0644aaf88c
Fixes #12154 - Limit concurrent virtual threads. (#12155)
Updated VirtualThreadPool to limit the number of concurrent virtual threads using a Semaphore.

Updated modules and documentation.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-21 10:44:20 +02:00
Olivier Lamy 2ca9be96ae
change urls https://eclipse.dev to https://jetty.org (#12172)
* change urls https://eclipse.dev to  https://jetty.org

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-08-21 07:18:20 +02:00
Jan Bartel 0cae6351f4
Issue #12173 Ingore dependencies of type pom for the webapp classpath (#12177) 2024-08-21 09:29:59 +10:00
Simone Bordet 942e77c3c5
Fixes #6514 - How to warm up SslConnection. (#12151)
Implemented "priming" of HTTP/1.1 connections using ConnectionPool.preCreateConnections(int) and HttpClientTransportOverHTTP.setInitializeConnections(true).

This sends `OPTIONS * HTTP/1.1` to the server.

I tried to implement this feature by forcing a write of 0 bytes from the layer above `SslConnection`, but it did not work when using TLS because in both WriteFlusher and SslConnection the fact that there are 0 bytes left to write is treated specially.

Other HTTP versions have no problems because they must initialize the connection by e.g. sending a SETTINGS frame, so they would also initialize TLS.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-20 10:19:32 +02:00
Tony Copping 2f22767dc1 Issue #12175 Update SslContextFactory to use Credential instead of Password
Signed-off-by: Tony Copping <tony@sigsoft.ca>
2024-08-19 18:41:35 -06:00
Joakim Erdfelt 877aaa5502
Merge pull request #12164 from jetty/fix/12.0.x/httpconfiguration-runtime-attributes
Issue #12163 - Adding missing HttpConfiguration fields to JMX and dump()
2024-08-15 19:19:49 -05:00
Joakim Erdfelt 457a672756
Issue #11408 - Environment property values are not expanded (#12169)
If a property belonged to an Environment, then that property value was not expanded.
2024-08-15 18:58:33 -05:00
Joakim Erdfelt 8dafe0988b
Issue #12163 - Adding more HttpConfiguration output of fields to dump and jmx 2024-08-14 08:41:53 -05:00
Simone Bordet e7f1512423 Fixes #3184 - Make LifeCycle implement AutoCloseable.
Rather than making LifeCycle AutoCloseable, just implement AutoCloseable in the client components.

Update tests to use try-with-resources accordingly.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-14 12:03:55 +03:00
Simone Bordet cc2cef1732 Fixes #12158 - Jetty12 migration help.
Updated documentation with section about migration of Handler code from Jetty 11 to Jetty 12.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-13 17:15:06 +03:00
Simone Bordet fc9cbda52f
Improved handling of 100 Continue (#12113)
* Now `HttpClient` removed the `Expect` header if there is no request content.
* Changed AbstractProxyServlet and ProxyHandler check for request content: now the Content-Type header is not taken into consideration.
* Now the server avoids sending the 100 Continue response if there is no request content.
* Now the request body is not defaulted if missing, but just kept null.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-13 15:06:50 +02:00
Dan Allen 8277051776
simplify configuration for Antora Collector (#12152)
- use shortform value when applicable
- rename base key to into
2024-08-12 18:16:22 +10:00
Olivier Lamy e7980c52b4
Fix h2spec plugin report and upgrade version (#12133)
* use standard surefire directory to have result parse via Jenkins

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

* h2spec last snapshot

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

* use h2-spec-maven-plugin version 1.0.13

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

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
2024-08-12 04:59:22 +02:00
Simone Bordet d0ea445d2d
Fixes #12122 - NPE in HttpReceiver.responseContentAvailable(). (#12123)
Now also the HttpReceiver.responseContentAvailable() is serialized, so that the access to `this.contentSource` is serialized with failure, and protected by a call to `exchange.isResponseCompleteOrTerminated()`.

Before, it was possible that a thread failed the response, nulling out `this.contentSource`, while another thread was just about to call `responseContentAvailable()` -- this was the case for HTTP/2 in particular, where content is notified asynchronously, rather than being created by a call to `ContentSource.read()`.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2024-08-07 18:30:51 +02:00