Commit Graph

20418 Commits

Author SHA1 Message Date
Lachlan Roberts b3144dd401 Issue #4447 - update websocket-jetty module description
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-07 16:14:32 +11:00
Greg Wilkins f50c2654b9 Fixes #4541 Large Headers
Added a HEADER_OVERFLOW result as per review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-06 21:17:58 +01:00
Greg Wilkins 2c8d405b83 Fixes #4550 XmlConfiguration named parameters
Do not match a missing varArgs executable is there is a matching method with no varArgs.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-06 18:55:42 +01:00
Simone Bordet 92d9d46f8e Fixes #2788 - Graceful close of HTTP/2 Connection.
Made HTTP2SessionContainer implement Graceful, so that it can be found
in the component hierarchy and can shutdown all sessions.
Modified HTTP2ServerSession to reject requests if already closed/shutdown.
Implemented shutdown in HTTP2Session.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-06 16:32:50 +01:00
Simone Bordet 8197c12325 Code cleanup.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-06 16:32:19 +01:00
Greg Wilkins d27f4ee556 Fixes #4550 XmlConfiguration named parameters
Fixed #4550 named parameters with a moderate refactor.
The named parameter matching was duplicated, only considering number of args and not applied to call arguments.    This refactor puts all the behaviour in common methods and reorders the arguments to match parameters.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-06 14:11:58 +01:00
Simone Bordet 5f118a0941
Merge pull request #4543 from eclipse/jetty-10.0.x-3953-client_direct_heap_bytebuffers
Fixes #3953 - Client configuration for direct/heap ByteBuffers.
2020-02-06 10:44:21 +01:00
Ludovic Orban 386d9348ca Use contants for CR and LF fields index
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-02-06 10:06:33 +01:00
Greg Wilkins 1b59e42294 Issue #4541 Large response header
Fix #4541 by initially allocated a header buffer of `min(_config.getResponseHeaderSize(), _config.getOutputBufferSize())`
Only allocate a buffer of `getResponseHeaderSize` if an overflow results.

This should have no effect on the majority of responses where `getOutputBufferSize` is greater than `getResponseHeaderSize` other than the cost of a min operation.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-05 10:29:41 +01:00
Simone Bordet 4fbbaf8b8e Fixes #3953 - Client configuration for direct/heap ByteBuffers.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-02-05 09:49:44 +01:00
Lachlan 41a7b8d4e3
Merge pull request #4539 from eclipse/jetty-10.0.x-4501-SharedBlockingCallback
Issue #4501 - remove all SharedBlockingCallback usage from websocket
2020-02-05 10:07:12 +11:00
Greg Wilkins 13458ab515 Fixed bad format
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-02-04 16:29:58 +01:00
Ludovic Orban 5df1ad9b66 change the format of detector's generated protocol name
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-02-04 12:42:35 +01:00
Ludovic Orban 58b1db610c detectAndUpgrade() shortcut on empty buffer
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-02-04 10:49:27 +01:00
Ludovic Orban 37edc016d2 improve debug logs
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-02-04 09:21:41 +01:00
Ludovic Orban 75b4719592 Implement detector connection factory with protocol detection mechanism
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
2020-02-03 16:56:53 +01:00
Lachlan Roberts cbb09413fd Issue #4501 - fix test expectations to throw CloseChannelException
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-03 18:34:19 +11:00
Lachlan Roberts 3344772e2f Issue #4447 - hard code in version for javax-websocket-api 1.1.2
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-03 18:29:46 +11:00
Lachlan Roberts 182daf8504 Issue #4501 - remove all SharedBlockingCallback usage from websocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-02-03 17:20:45 +11:00
Lachlan f8219a56cc
Merge pull request #4535 from eclipse/jetty-10.0.x-4462-javaxWSClose
Issue #4462 - do not throw IOException on Javax websocket close
2020-02-03 10:22:23 +11:00
Jan Bartel fe8b11dd48 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2020-02-01 11:27:09 +01:00
Jan Bartel ecd0fe97f7
Issue #4520 Reinstate throw of UnreadableSessionDataException (#4528)
* Issue #4520 Reinstate throw of UnreadableSessionDataException

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-02-01 11:13:58 +01:00
Greg Wilkins 4dbf8a3a9e
Issue #4495 ReservedThreadExecutor optimise (#4499)
* Issue #4495 ReservedThreadExecutor optimise

Use synchronousQueue for task handoff

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4495 ReservedThreadExecutor optimise

updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4495 ReservedThreadExecutor optimise

Use a linked queue rather than a deque(as a stack).  This should be simpler, better optimised and less contended.  Idling has been simplified so that a reserve thread is always dropped every idle period.

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4495 ReservedThreadExecutor optimise

reverted RTE and added a JMH benchmark

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* More variants and longer tests

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Added LQ

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* removed SQ2

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4495 ReservedThreadExecutor optimise

Replaced real implementation with SQ

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4495 RTE optimise

Removed alternate implementations

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4495 RTE optimise

updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-31 19:54:44 +01:00
Greg Wilkins b6f2fd2432
Issue #4529 Servlet in error page (#4530)
Added option for #4529 to control showing the servlet in an error page.
Error configuration really needs a module, but will add in 10 with a refactor.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-31 19:53:05 +01:00
Jesse McConnell 769cd9de69
Merge pull request #3364 from eclipse/jetty-9.4.x_maven_plugin_site
Issue #3247 Generate jetty-maven-plugin website
2020-01-31 07:14:24 -06:00
Greg Wilkins f88eb73a91
Issue #4533 Hard close from Dispatcher (#4534)
* Issue #4533 Hard close from Dispatcher

Signed-off-by: Greg Wilkins <gregw@webtide.com>

#4533 Do hard close from Dispatcher so response wrappers may intercept close.

* Issue #4533 Hard close from Dispatcher

Signed-off-by: Greg Wilkins <gregw@webtide.com>

#4533 improve test after review

* Issue #4533 Hard close from Dispatcher

Some renaming of methods to make it clear that softClose should only be used as part of sendError handling.  If softClose is used by other components, then sendError can be prevented from setting the error status.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-31 11:55:14 +01:00
Lachlan Roberts fde1ab3e5b Issue #4462 - fix incorrect test expectations
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-01-31 16:31:35 +11:00
Lachlan Roberts a7c0c57496 Issue #4447 - separate modules for jetty and javax websockets
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-01-31 15:58:20 +11:00
Lachlan Roberts bdaa06e8dd Issue #4462 - do not throw IOException on Javax websocket close
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-01-31 11:09:30 +11:00
Simone Bordet ce6e146ac1
Merge pull request #4489 from eclipse/jetty-10.0.x-2643-pkcs12_keystores
Fixes #2643 - Switch SslContextFactory.keystoreType from JKS to PKCS12.
2020-01-30 19:28:49 +01:00
Simone Bordet 8bd1a7f5bc Using only non-obfuscated passwords in tests.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-30 18:48:08 +01:00
Simone Bordet 4b9fec0cf3 Updates after review.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-30 17:53:41 +01:00
Greg Wilkins 5aaec6e23f
Issue #4321 Refactored Graceful shutdown (#4482)
* Issue #4321 Refactored Graceful shutdown

removed stopTimeout from all abstractLifeCycles.  It is on Graceful.LifeCycle, which is only implemented by components that can start a graceful shutdown (eg Server, ContextHandler and QueuedThreadPool)

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

cleanup after review

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

reinstate other stop tests (more work to do).

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

Fixes for stop test by improving LocalConnector shutdown handling

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

Removed broken test on LocalConnector that is already tested in GracefulStopTest

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

Fixed all stop tests

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

fixed checkstyle

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

No stopTimeout JMX attribute

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

Dump stopTimeout
test with default stopTimeout

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

USe sendError for 503

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

minor cleanups

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

Simplifications after review

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

after review

Signed-off-by: Greg Wilkins <gregw@webtide.com>

* Issue #4321 Refactored Graceful shutdown

after review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-30 17:05:03 +01:00
Simone Bordet 1ee26ba736 Merged branch 'jetty-9.3.x' into 'jetty-9.4.x'. 2020-01-30 12:09:35 +01:00
Simone Bordet 4139b67d8f Replaced references to branch 'master' with 'jetty-9.3.x'.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-30 11:32:37 +01:00
Simone Bordet 7592d36c4b Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2020-01-30 10:41:43 +01:00
Simone Bordet 7746be770a Merged branch 'jetty-9.3.x' into 'jetty-9.4.x'. 2020-01-30 10:17:10 +01:00
Simone Bordet f52ed62f36 Merged branch 'jetty-9.2.x' into 'jetty-9.3.x'. 2020-01-30 10:09:34 +01:00
Simone Bordet 305e4609b2 Updated ALPN version for JDK 8u241 and 8u242.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2020-01-30 10:03:38 +01:00
Simone Bordet 3b2b74939e
Merge pull request #4527 from eclipse/jetty-10.0.x-WebSocketServerContainers
Make the WebSocketServerContainer initialize methods private
2020-01-30 09:47:07 +01:00
Lachlan Roberts b4d2ccc6b8 Make the WebSocketServerContainer initialize methods private
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-01-30 15:01:15 +11:00
Lachlan 1b10e2330e
Merge pull request #4522 from eclipse/jetty-10.0.x-4226-JavaxWebSocketJPMS
Issue #4226 - fix JPMS issues with javax websockets
2020-01-30 12:09:02 +11:00
Lachlan Roberts 006fd3f913 Issue #4226 - fix test failures
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-01-30 11:26:51 +11:00
Lachlan Roberts 82c61c48eb Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-4226-JavaxWebSocketJPMS 2020-01-30 10:37:34 +11:00
Lachlan 19354d0c24
Merge pull request #4523 from eclipse/jetty-10.0.x-4502-wsOnClose
Issue #4502 - allow changing of close response from jetty and javax websocket onClose events
2020-01-30 09:10:48 +11:00
Jan Bartel 45771dbd26 Fix bad merge 2020-01-29 12:08:13 +01:00
Jan Bartel 79a337567f Issue #4247 use context default for samesite cookie attribute (#4512)
* Issue #4247 use context default for samesite cookie attribute

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-01-29 11:54:43 +01:00
Greg Wilkins 842fa6aa53 Issue #4504 Forwarded Host and Server (#4511)
X-Forwarded-Host has precedence of X-Forwarded-Server and outcome is not order dependent.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2020-01-29 11:54:43 +01:00
Simone Bordet a682fe1772
Merge pull request #4451 from eclipse/jetty-10.0.x-4450-WebSocketCoreJPMS
Issue #4450 - websocket-core exposes internal classes
2020-01-29 11:17:40 +01:00
Jan Bartel 9850c29839
Issue #4247 use context default for samesite cookie attribute (#4512)
* Issue #4247 use context default for samesite cookie attribute

Signed-off-by: Jan Bartel <janb@webtide.com>
2020-01-29 11:05:35 +01:00