Commit Graph

17958 Commits

Author SHA1 Message Date
Lachlan Roberts 1709c90286 Issue #3290 - fixing issues with WebSocketClose
introduce channelState check in the catch in WSChannel sendFrame
to guard from multiple closes

WebSocketConnection fillAndParse will now try to read until EOF

removed state change in the isOutputOpen check in webSocketChannelState
to as we do the state change in the catch block in WSChannel

added and improved WebSocketCloseTest to test more cases

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-02-07 09:58:43 +11:00
Lachlan Roberts ff1f3ca3be Issue #3290 - WebSocket read and writer error handling
when the WSConnection reads EOF it now notifies the WSChannel
the channel instead of handling it locally

fixed FlusherFlusher failure issues

fixed issue with the WebSocketCloseTest expecting close reason

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-02-07 09:58:08 +11:00
Greg Wilkins 7fca634292 fixed bad merge
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-02-05 10:48:07 +11:00
Jan Bartel aeba829b33
Issue #3308 Remove deprecated session methods (#3309)
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-02-05 10:08:49 +11:00
Greg Wilkins a41f270e47
Merge pull request #3310 from lachlan-roberts/jetty-10.0.x-3298-completableFutures
Issue #3298 - WebSocket UpgradeRequests and CompletableFutures
2019-02-05 08:40:18 +11:00
Greg Wilkins 2405e5417d Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-02-05 08:24:38 +11:00
Greg Wilkins 051edc94d7 Merge remote-tracking branch 'origin/jetty-9.3.x' into jetty-9.4.x
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-02-05 08:21:38 +11:00
Simone Bordet fda815cd56
Merge pull request #3306 from eclipse/jetty-9.4.x-3305-avoid_select_now
Fixes #3305 - Avoid additional selectNow().
2019-02-04 11:44:13 +01:00
Simone Bordet bf6521da5f
Merge pull request #3312 from eclipse/jetty-9.4.x-3311-http_https_same_port
Fixes #3311 - Ability to serve HTTP and HTTPS from the same port.
2019-02-04 09:17:35 +01:00
Lachlan Roberts bfcb890ab2 Issue #3298 - rename typo in JettyWebSocketTest name
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-02-04 15:05:15 +11:00
Lachlan Roberts 77b7e275cc Issue #3298 - fix to pom file
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-02-04 14:54:27 +11:00
Simone Bordet da490673af Fixes #3311 - Ability to serve HTTP and HTTPS from the same port.
Updated implementation and tests after reviews.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-03 14:24:07 +01:00
Simone Bordet 9af4707556 Issue #3234 - AuthenticationProtocolHandler should not cache the failed results.
Fixed failing test.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-02 18:56:58 +01:00
alexey.barsov 25afa868da Issue #3302 Supporting host:ip in X-Forwarded-For (fixing unit tests)
Signed-off-by: alexey.barsov <alexey.barsov@jetbrains.com>
2019-02-01 15:48:58 +01:00
alexey.barsov 803a45b43b Issue #3302 Supporting host:ip in X-Forwarded-For (fixing review remarks)
Signed-off-by: alexey.barsov <alexey.barsov@jetbrains.com>
2019-02-01 15:38:33 +01:00
Simone Bordet 33bceb3cc8 Fixes #3234 - AuthenticationProtocolHandler should not cache the failed results.
Now only caching authentication results for 2xx and 3xx codes.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-01 12:21:21 +01:00
Simone Bordet 66873e8637 Code cleanups.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-01 12:20:22 +01:00
Simone Bordet d9855fb1bc Fixes #3311 - Ability to serve HTTP and HTTPS from the same port.
Do not assume that the read from the network produced more than 1 byte.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-01 09:14:32 +01:00
Simone Bordet e939cd2188
Merge pull request #3267 from eclipse/jetty-10.0.x-132_client_connector
Issue #132 - ClientConnector abstraction.
2019-01-31 17:37:10 +01:00
Simone Bordet 5061a5ca30 Fixes #3311 - Ability to serve HTTP and HTTPS from the same port.
Fixed handling of upgradeTo() in case of null buffers.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-01-31 17:15:07 +01:00
Simone Bordet ccda1ee5f6 Fixes #3311 - Ability to serve HTTP and HTTPS from the same port.
Introduced PlainOrSslConnectionFactory, to "sniff" the first bytes
on a connection and upgrade to SSL (if the bytes are TLS bytes), or
upgrade to a specific, configured, protocol.

Added also the ability to fail the upgrade in case of a `http`
request to a `https` port and write a minimal response to the client.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-01-31 13:23:58 +01:00
Lachlan Roberts 6a98cc0bd2 Issue #3298 - bug fixes for jetty websockets
succeed callback when you do not have a message sink

OnWebSocketFrame annotation should take an API frame not a core frame

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-31 22:24:09 +11:00
Lachlan Roberts bd4f9b30fc Issue #3298 - cleanup of CompletableFutures for WebSocket upgrades
Jetty and Javax ClientUpgradeRequests no longer use the combination of
the the onOpenFuture and the futureCoreSession and instead use only
the CompletableFuture future given to the FrameHandler onOpen

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-31 11:13:05 +11:00
olivier lamy b43fe865bf fix merge
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-01-31 09:50:07 +10:00
olivier lamy 86d0c9a4fe Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-01-31 09:42:25 +10:00
olivier lamy 6fee10d537 use snapshot of maven-invoker-plugin because of NPE https://issues.apache.org/jira/browse/MINVOKER-247
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-01-31 09:40:08 +10:00
Simone Bordet d02762140d Fixes #3305 - Avoid additional selectNow().
Using system property "org.eclipse.jetty.io.forceSelectNow"
to force a selectNow() call; if absent, forcing selectNow()
only in the Windows OS.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-01-30 19:41:35 +01:00
alexey.barsov edf74a6554 Issue #3302 Supporting host:ip in X-Forwarded-For
Signed-off-by: alexey.barsov <foster_licey_reg@mail.ru>
2019-01-30 11:11:44 +01:00
Lachlan Roberts 684dcd1693 Merge remote-tracking branch 'eclipse/jetty-10.0.x' into jetty-10.0.x-3298-completableFutures 2019-01-30 15:00:01 +11:00
Greg Wilkins bd0a61b1d5
Merge pull request #3286 from lachlan-roberts/jetty-10.0.x-websocketmapping-refactor
WebSocketMapping Refactor to have a mapping per filter/servlet
2019-01-30 14:56:27 +11:00
Jan Bartel ce976b5aa3
Issue #3249 Update to apache jsp 9.0.14 (#3299)
* Issue #3249 Update to apache jsp 9.0.14

Signed-off-by: Jan Bartel <janb@webtide.com>
2019-01-30 14:31:58 +11:00
Jan Bartel e789cd6834 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-01-30 14:26:52 +11:00
Lachlan Roberts 78dc801153 WebSocketMapping Refactor - add javadoc for WebSocketComponents
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-30 14:02:50 +11:00
Jan Bartel 169d93e790
Jetty 9.4.x 3284 sessions and system clock jitter (#3296)
* Issue 3284 System clock jitter can affect session timers.

Signed-off-by: Jan Bartel <janb@webtide.com>
2019-01-30 14:02:35 +11:00
Lachlan Roberts deaaa0bf30 Merge remote-tracking branch 'eclipse/jetty-10.0.x' into jetty-10.0.x-websocketmapping-refactor 2019-01-30 13:49:10 +11:00
Greg Wilkins 58b73c10af
Merge pull request #3291 from eclipse/jetty-10.0.x-3290-websocket-onOpen
Issue #3290 async websocket onOpen, onError and onClose
2019-01-30 12:05:09 +11:00
Lachlan Roberts b4bd5980aa Issue #3298 - Refactor of upgrade request class names
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-30 10:00:56 +11:00
Lachlan Roberts b0aec2b26e fix bug in WebSocketMapping failing isInstance test
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-29 15:26:16 +11:00
Greg Wilkins f5751618bd Issue #3290 async onOpen, onClose and onError
Fixed OSGi tests.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-29 13:08:35 +11:00
Lachlan Roberts 8c5d421b5b remove unnecessary imports in jetty-websocket-tests
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-29 12:03:53 +11:00
Greg Wilkins cf0eaecbdc Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-3290-websocket-onOpen
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-29 10:59:08 +11:00
Greg Wilkins 1d9e7b7613
Merge pull request #3199 from lachlan-roberts/jetty-10.0.x-3139-npe-websocket-sci
Issue #3139 - NPE in WebSocketContainerInitializer for jetty10
2019-01-29 10:56:59 +11:00
Greg Wilkins 3ad584eaef Issue #3290 async onOpen, onClose and onError
Changes after review:
 + failure to send abnormal close closes connection prior to failing
   callback.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-29 10:45:54 +11:00
Greg Wilkins 6f7395c8f0 Issue #3290 async onOpen, onClose and onError
Changes after review:
 + fixed import order

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-29 10:38:12 +11:00
Greg Wilkins 84d74ba1de Issue #3290 async onOpen, onClose and onError
Changes after review:
 + removed Adaptor from FrameHandler, so all non test usages of
   FrameHandler now use async API.
 + Fixed sequencing of multiple async operation so callback is notified
   after completion (created more Callback.from utilities for this)
 + fixed import order

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-29 10:33:37 +11:00
Lachlan Roberts 402d756ea5 rename websocket-tests module to jetty-websocket-tests
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-29 10:29:38 +11:00
Greg Wilkins 1171d7c8d7 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-3290-websocket-onOpen 2019-01-26 18:16:30 +11:00
Greg Wilkins 8b93922d08 Issue #3290 async onOpen, onClose and onError
Gave onOpen, onError and onClose callback signatures
Illegal to ask for demand prior to onOpen success
added tests for various onOpen scenarios

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-26 15:34:50 +11:00
Simone Bordet fe5b7be7f6 Fixes #3293 HttpClientTLSTest.testNoCommonTLSProtocol() fail with jdk 11.0.2.
Updated to force TLS 1.3 vs TLS 1.2, rather TLS 1.2 vs TLS 1.1.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-01-25 17:02:00 +10:00
Lachlan Roberts aa1d6ff9cd WebSocketMapping refactor changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-25 17:11:27 +11:00