Commit Graph

18367 Commits

Author SHA1 Message Date
Greg Wilkins 6db357d2fc Completed implementation of GzipRequestCustomizer 2019-03-13 13:30:54 +11:00
Greg Wilkins 0fb17bff76 Issue #3012 Compliance modes.
Updated unit tests for messages and reasons

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-13 11:47:11 +11:00
Greg Wilkins 3b7338888b
Merge pull request #3452 from eclipse/jetty-9.4.x-3444-httpfields-add-preencoded
Jetty 9.4.x 3444 httpfields add preencoded
2019-03-13 11:06:12 +11:00
Greg Wilkins 8b2b626f3c
Merge pull request #3455 from eclipse/jetty-10.0.x-3453-remove-deprecated-websocket-extension-api
Issue #3453 - Removing deprecated Extension classes in jetty-websocket-api
2019-03-13 11:05:47 +11:00
Greg Wilkins 61484a1209
Merge pull request #3448 from lachlan-roberts/jetty-10.0.x-cometd5
Issue #3446 - upgrade jetty-websockets with WebSocketUpgradeFilter
2019-03-13 11:03:01 +11:00
Greg Wilkins 925d38b9db Issue #3012 Compliance modes.
CookieCompliance implemented new APIs

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-13 10:15:26 +11:00
Greg Wilkins 6baa4a96f7 Issue #3012 Compliance modes.
unused field

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-13 09:54:15 +11:00
Greg Wilkins e92808156d Issue #3012 Compliance modes.
clean up violation testing and reporting in HttpParser

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-13 09:45:51 +11:00
Greg Wilkins 73ad887ce8 Issue #3012 Compliance modes.
Added an abstraction of general compliance mode, violation and listener

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-13 09:17:46 +11:00
Joakim Erdfelt 8a0fff9153 Issue #3453 - Removing deprecated Extension classes in jetty-websocket-api
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-03-12 10:23:51 -05:00
Greg Wilkins 7b407ecb6c Issue #3440 Stop failed lifecycle
stop in reverse order.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-12 22:44:12 +11:00
Greg Wilkins c1f6f6b608 Implementation of a request customizer to do gzip inflation
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-12 18:05:41 +11:00
Jan Bartel 8e21c968d5 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-03-12 12:14:46 +11:00
Greg Wilkins 5e388810c4 Issue #3444 Preencoded unknown field
New test class not needed.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-12 11:29:57 +11:00
Greg Wilkins fbda9a0799 Issue #3444 Preencoded unknown field
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-12 11:26:09 +11:00
Olivier Lamy 4f1b28eb3c Issue #3415 re enable infinispan test with using correct version of infinispan (#3443)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-03-12 11:20:05 +11:00
lachan-roberts 8f727bef40 Issue #3446 - changes from review
use the same FrameHandlerFactory for WebSocketServlet and
WebSocketUpgradeFilter

removed addMapping with PathSpec and only support addMapping
with String

JettyWebSocketServerContainer now implements WebSocketPolicy which
configures the FrameHandler.Customizer

Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-12 10:46:22 +11:00
Greg Wilkins 0ecbdec9d0 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-3012-Compliance 2019-03-12 09:24:06 +11:00
Greg Wilkins 76a37352f5 Issue #3440 Stop on Unavailable
+ revert schedulers to non-daemon threads for now so this PR can
   proceed.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-12 09:21:19 +11:00
Simone Bordet c6617884e8 Issue #1350 - Dynamic selection of the transport to use based on ALPN on the client side.
Simplified ProxyProtocolClientConnectionFactory
to use Origin.Address rather than InetSocketAddress.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-03-11 11:11:42 +01:00
lachan-roberts e355ec31b8 Issue #3446 - renaming, code cleanup and fixes
rename WebSocketSessionImpl to WebSocketSession

remove SessionListener which is unused and replaced by
WebSocketSessionListener

Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-11 18:07:52 +11:00
lachan-roberts e9df97e314 Issue #3446 - allow jetty-websocket upgrades with WebSocketUpgradeFilter
JettyWebSocketServerContainer moved out of internal and is now used
in a similar way to the Javax server container, and can now be
used to configure upgrades using the shared mapping with
the WSUpgradeFilter

the JettyWSSCI now works in the same way as the JavaxWSSCI, the
JettyWebSocketEmbeddedStarter has been removed and the configureContext
now returns the JettyWebSocketServerContainer

WebSocket upgrade failures due to exceptions will now be logged as
a warning in WebSocketMapping rather than being ignored

Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-11 18:05:44 +11:00
lachan-roberts 265e0be6f7 Issue #3446 - jetty-websocket tests for WebSocketUpgradeFilter
Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-11 18:05:44 +11:00
lachan-roberts a01fc193a1 WebSocket code cleanups and renaming
rename JettyWSSCI.configure to configureContext, this is more similar
to the javax equivalent version

introduce helper method getMapping in WebSocketMapping

WebSocketServletFactory now implements FrameHandler.Configuration

changed WebSocketMapping Attribute name in WebSocketUpgradeFilter

Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-11 18:05:44 +11:00
Greg Wilkins 1160a1c5de
Merge pull request #3439 from lachlan-roberts/jetty-10.0.x-3406-restore-jetty-websocket-tests
Issue #3406 - restore jetty websocket tests
2019-03-11 17:19:01 +11:00
Greg Wilkins a9707471a0 Issue #3440 Stop on Unavailable
+ ContainerLifeCycle stops started beans on failure.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-11 17:10:03 +11:00
Greg Wilkins 054d7f240e Issue #3440 Stop on Unavailable
+ cleanup after review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-11 16:41:20 +11:00
Greg Wilkins 9a75a40284 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-3440-StopOnUnavailable 2019-03-11 09:51:25 +11:00
Joakim Erdfelt b1477ac067 Issue #3444 - Adding testcase about reported issue
+ Works with simple HttpField, but not PreEncodedHttpField

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-03-08 15:05:54 -06:00
Joakim Erdfelt 133a4a10c0 Issue #3444 - Adding testcase for HttpFields.add(PreEncoded|HttpField)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-03-08 14:42:32 -06:00
Simone Bordet 29913f93bf Issue #1350 - Dynamic selection of the transport to use based on ALPN on the client side.
Added javadocs and small changes after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-03-08 17:14:41 +01:00
lachan-roberts ddd60f1992 Issue #3406 - changes from review
Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-08 14:50:49 +11:00
Jan Bartel 69ea8877f3 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-03-08 10:46:11 +11:00
Jan Bartel beb4881af4
Issue #3394 Remove unused JAASGroup,RoleCheckPolicy,StrictRoleCheckPolicy (#3433)
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-03-08 10:44:39 +11:00
Simone Bordet d2e13ec5ad Code cleanup and improved toString() and javadocs.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-03-07 12:27:43 +01:00
Greg Wilkins 375ad81f4b Issue #3440 Stop on Unavailable
+ Any schedulers created are named (for ease of debug) and daemon
   so they do not stop the JVM exiting.
 + If the server.doStart() fails, it calls server.doStop to ensure
   connectors are stopped, ports are free etc.
 + cleanup of addBean handling of scheduler in proxy

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-07 15:10:53 +11:00
lachan-roberts 01bc9d3835 Issue #3406 - fix SessionTracker and JettyWebSocketFrameHandlerTest
Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-07 14:19:35 +11:00
lachan-roberts 59ec0da768 Issue #3406 - fix jetty websocket tests
Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-07 10:52:03 +11:00
lachan-roberts 155974bc07 Issue #3406 - jetty and javax WebSocket FrameHandler fixes
invoke the close handle in onClosed instead of onCloseFrame in
JettyWebSocketFrameHandler

in both frame handlers replace usage of getClass().getName()
with getClass().getSimpleName() to increase the amount of characters
from the original exception which can fit in the close frame message

Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-07 10:27:50 +11:00
lachan-roberts 13f8202c06 Issue #3412 - fix WebSocketClient configuration methods
WebSocketClient implements WebSocketPolicy but the methods were never
wired through to use the websocket core FrameHandler.Customizer

the WSClient now has a ConfigurationCustomizer which it uses to
configure the WebSocketCoreClient

Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-07 10:27:50 +11:00
Lachlan Roberts 16fa1133d7 Issue #3406 - enabling all disabled tests in WebSocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-03-07 10:22:59 +11:00
Greg Wilkins 92e120bcac Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-3012-Compliance 2019-03-07 07:46:32 +11:00
Greg Wilkins a31ba98e29 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-07 07:45:28 +11:00
WalkerWatch 7bb1adb798 Fixing typo identified in #3176
Signed-off-by: WalkerWatch <ctwalker@gmail.com>
2019-03-06 13:08:10 -05:00
Simone Bordet aa211b033d Issue #1350 - Dynamic selection of the transport to use based on ALPN on the client side.
Introduced `HttpClientTransportDynamic` to be able to switch transport dynamically.
Refactored other transports and HttpDestination, removing now unnecessary classes.

Introduced ProxyProtocolClientConnectionFactory and used it for testing.
Updated OSGi tests now that jetty-client depends on jetty-alpn-client.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-03-06 10:26:10 +01:00
Greg Wilkins c341928b84
Merge pull request #3390 from lachlan-roberts/jetty-10.0.x-3106-websocketConnectionStats
Issue #3106 - implement WebSocketConnection stats
2019-03-06 18:00:41 +11:00
Greg Wilkins 4bb6a920c0
Merge pull request #3432 from lachlan-roberts/jetty-10.0.x-websocket-fixes-from-proxy
WebSocketChannel bug fixes, cleanup and javadoc updates for FrameHandler
2019-03-06 17:59:58 +11:00
Greg Wilkins a652ce20ee Issue #3012 refactored HttpCompliance
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-06 17:20:31 +11:00
lachan-roberts ab304a096e avoid adding NULL UpgradeListeners to WebSocketClient
Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-06 17:11:57 +11:00
Greg Wilkins dbf0d2e6be Issue #3421 Duplicate session set-cookie (#3426)
Added Response.replaceCookieuse replaceCookie in sessions
unit tests

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-03-06 14:44:48 +11:00