Commit Graph

91 Commits

Author SHA1 Message Date
Joakim Erdfelt ab228fde9e Updating to version 9.4.28.v20200408 2020-04-08 12:33:56 -05:00
Joakim Erdfelt 8aabb52557 Updating to version 9.4.28-SNAPSHOT 2020-02-27 13:03:44 -06:00
Joakim Erdfelt a304fd9f35 Updating to version 9.4.27.v20200227 2020-02-27 12:21:57 -06:00
Joakim Erdfelt 56fc476d55 Updating to version 9.4.27-SNAPSHOT 2020-01-17 07:00:10 -06:00
Joakim Erdfelt 7b38981d25 Updating to version 9.4.26.v20200117 2020-01-17 06:21:47 -06:00
Joakim Erdfelt 8c65309963
Addressing Checkstyle violations in src/test/java
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2020-01-14 12:33:34 -06:00
Lachlan Roberts a7b9df96fd cleanup WebSocket logging in EventSocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-01-14 10:33:19 +11:00
Lachlan e1f19be353
Closes #2620 - guard against exceptions for WebSocket onClose and onError (#4346)
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2020-01-14 09:22:56 +11:00
Simone Bordet 923ec38adf Merged branch 'jetty-9.3.x' into 'jetty-9.4.x'. 2020-01-07 16:51:25 +01:00
Joakim Erdfelt f4e7e4c3db Merge branch 'release-9.4.25' into jetty-9.4.x 2020-01-03 12:49:27 -06:00
olivier lamy e1371a1c13 happy new year
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2020-01-02 21:54:05 +01:00
Joakim Erdfelt 8974176c4b Updating to version 9.4.26-SNAPSHOT 2019-12-20 11:30:41 -06:00
Joakim Erdfelt a9729c7e7f Updating to version 9.4.25.v20191220 2019-12-20 10:46:56 -06:00
Joakim Erdfelt 0f7a3b2d91 Updating to version 9.4.25-SNAPSHOT 2019-11-20 16:08:38 -06:00
Joakim Erdfelt 363d5f2df3 Updating to version 9.4.24.v20191120 2019-11-20 15:25:01 -06:00
Joakim Erdfelt 453d41940b Updating to version 9.4.24-SNAPSHOT 2019-11-18 13:52:51 -06:00
Joakim Erdfelt abbccc65d6 Updating to version 9.4.23.v20191118 2019-11-18 13:09:44 -06:00
Joakim Erdfelt 2d50c92979
Fixes #4296 - WebSocketClient cannot connect with "%25" in query
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-12 10:22:19 -06:00
Joakim Erdfelt 1ed13b6b30 Updating to version 9.4.23-SNAPSHOT 2019-10-22 09:19:41 -05:00
Joakim Erdfelt b1e6b55512 Updating to version 9.4.22.v20191022 2019-10-22 08:20:50 -05:00
Greg Wilkins 2eb251a4b8 fix logging defaults to INFO
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-10-16 13:53:57 +11:00
Lachlan 00baa7147e
Merge pull request #4153 from eclipse/jetty-9.4.x-3558-websocket_onErrorAfterClose
Issue #3558 - only notify WS onError if onClose has not been called
2019-10-10 15:27:11 +11:00
Lachlan Roberts d95c825c5c Issue #3558 - only notify WS onError if onClose has not been called
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-10-04 11:13:38 +10:00
Joakim Erdfelt 6fc42d8ba2 Merge branch 'release-9.4.21' into jetty-9.4.x 2019-10-01 13:35:43 -05:00
Lachlan fef5975b86
Merge pull request #4108 from eclipse/jetty-9.4.x-4104-WSSession_SendAfterClose
Issue #4104 - WebSocketSession will reject outgoing frames if closed
2019-10-01 15:46:16 +10:00
Joakim Erdfelt 7807eafad9 Updating to version 9.4.22-SNAPSHOT 2019-09-26 10:46:28 -05:00
Joakim Erdfelt 72970db61a Updating to version 9.4.21.v20190926 2019-09-26 09:59:15 -05:00
Lachlan 3edc6c9102
Issue #3734 - throw ISE for WebSocket suspend after close (jetty-9.4) (#4098)
* Issue #3734 - throw ISE for WebSocket suspend after close

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #3734 - suspend is error if onClose() has been called

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-25 14:55:13 +10:00
Lachlan Roberts 5a52235464 Issue #4104 - WebSocketSession will reject outgoing frames if closed
Outgoing frames will now go RemoteEndpoint->Session->ExtensionStack
instead of just RemoteEndpoint->ExtensionStack.

This will allow the Session to check whether it has been closed before
allowing the frame through the ExtensionStack.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-20 10:30:31 +10:00
Lachlan Roberts 63c7a44969 Issue #3982 - fix to WebSocket bytesIn for flaky WebSocketStatsTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-13 11:18:57 +10:00
Lachlan Roberts c2eff992b7 Issue #3982 - fix to WebSocket bytesIn for flaky WebSocketStatsTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-13 11:15:13 +10:00
Lachlan 74e560fb7a
Issue #4031 - stop unopened WebSocketSessions gracefully (#4046)
* Issue #4031 - stop unopened WebSocketSessions gracefully

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* Issue #4031 - notify onError if shutdown before open

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-06 13:50:33 +10:00
Greg Wilkins bde86467f4
Issue #3806 - Make Async sendError fully Async (#3912)
* Issue #3806 async sendError

Avoid using isHandled as a test withing sendError as this can be
called asynchronously and is in a race with the normal dispatch of the
request, which could also be setting handled status.

The ErrorHandler was dispatching directly to a context from within
sendError.  This meant that an async thread can call sendError and be
dispatched to within the servlet container at the same time that the
original thread was still dispatched to the container.

This commit fixes that problem by using an async dispatch for error
pages within the ErrorHandler.  However, this introduces a new problem
that a well behaved async app will call complete after calling
sendError.  Thus we have ignore complete ISEs for the remainder of
the current async cycle.

Fixed the closing of the output after calling sendError. Do not
close if the request was async (and thus might be dispatched to an
async error) or if it is now async because the error page itself is
async.

* updates from review
* better tests
* revert ignore complete
* added some TODOs
* more TODOs
* fixed rename
* cleanup ISE and more TODOs
* refactored to call sendError for uncaught exceptions rather than onError
* more of the refactor
* extra tests for sendError from completing state

Reworked HttpChannelState and sendError so that sendError is now
just a change of state. All the work is done in the ErrorDispatch
action, including calling the ErrorHandler.  Async not yet working.

Additional tests

Converted ERRORED state to a separate boolean so it can be used for
both Sync and Async dispatches.

Removed ASYNC_IO state as it was just the same as DISPATCHED

The async onError listener handling is now most likely broken.


WIP making sendError simpler and more tests pass
WIP handling async and thrown exceptions
WIP passing tests

Improved thread handling

removed bad test

Implemented error dispatch on complete properly
more fixed tests

sendError state looks committed

- Added resetContent method to leave more non-content headers during sendError
- Fixed security tests
- simplified the non dispatch error page writing.  Moved towards being able to write async

* fixed gzipHandlerTest

* Updated handling of timeout errors.  According to servlet spec,
exceptions thrown from onTimeout should not be passed to onError, but
just logged and ignored:

   If an exception is thrown while invoking methods in an AsyncListener,
   it is logged and will not affect the invocation of any other AsyncListeners.

* This changes several tests.

* Dispatcher/ContextHandler changes for new ERROR dispatch handling. Feels a bit fragile!

* Fixed tests in jetty-servlets
* Fixed tests in jetty-proxy

* more test fixes

* Fixed head handling
reverted unnecessary changes
Improved reason handling

WIP on fully async error handling.
Simplified HttpChannelState state machines to allow for async actions
during completing

more WIP on fully async error handling.

sendError and completion are not both non-blocking, without using
a startAsync operation. However we are lacking unit tests that actually
exercise those code paths.

* Simplified name of states
Added test for async completion
* Cleanups and javadoc
* Cleanups and javadoc
* remove snake case
* feedback from review
* Write error page into fixed pooled buffer

Use the response to get/release a pooled buffer into which the error
page can be written.  Make it a fixed sized buffer and if it overflows
then no error page is generated (first overflow turns off showstacks
to save space).

The ErrorHandler badly needs to be refactored, but we cannot change
API in jetty-9

* More test fixes for different error page format
* minor cleanups
* Cleanup from Review
* Fixed javadoc
* cleanups and simplifications
* Cleanup from Review
* renaming and some TODOs
* Cleanup from Review
* Checkstyle fixes
* Cleanup from Review
* Code cleanups and simplifications
* fixed debug
* Cleanup from Review
* Ensure response sent before server shutdown
* removed unnecessary optimisation
* fixed duplicate from merge
* Updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-08-26 17:55:58 +10:00
Olivier Lamy fe3d3f7158
fix checkstyle in test sources (#4013)
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-22 19:56:41 +10:00
Lachlan 44986be6c0
fix flaky test ClientCloseTest.testStopLifecycle() in jetty 9.4.x (#3990)
* fix flaky test ClientCloseTest.testStopLifecycle() in 9.4.x

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>

* test code cleanups in ClientCloseTest

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-08-20 12:49:52 +10:00
Joakim Erdfelt 50b524bb6b Merge branch `release-9.4.20` into `jetty-9.4.x` 2019-08-15 07:27:25 -05:00
Lachlan Roberts 11d1ad6504 disable flaky test WebSocketConnectionStatsTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-08-15 08:04:57 +10:00
Joakim Erdfelt f1efc99918 Updating to version 9.4.21-SNAPSHOT 2019-08-13 17:34:20 -05:00
Joakim Erdfelt 84700530e6 Updating to version 9.4.20.v20190813 2019-08-13 16:13:21 -05:00
Joakim Erdfelt b8f29630ed Issue #3884 - Updating tests and fixing merge
+ Test cases have been updated based on PR review
+ Fixing merge from `jetty-9.4.x` that caused a duplicate
  JettyListenerEventDriver.onContinuationFrame() method

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-05 12:52:20 -05:00
Joakim Erdfelt 1ee771e991 Merge branch `jetty-9.4.x` into `jetty-9.4.x-3884-websocket-frame-listener` 2019-08-05 12:27:53 -05:00
Joakim Erdfelt f36358c631 Issue #3884 - Adding NullMessage to satisfy PR review
+ If an annotated Jetty WebSocket Endpoint doesn't have
  a handler for data types TEXT or BINARY then the
  new NullMessage (sink) is used for that specific data type
  to consume (quietly) those ignored Messages.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-18 08:04:17 -05:00
Joakim Erdfelt 02c49efc5f Issue #3884 - Adding testcase to satisfy PR review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-18 07:51:12 -05:00
Joakim Erdfelt f4ce98b1c8 Issue #3884 - Pure @OnWebSocketFrame usage should not process Continuation events
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-17 15:51:35 -05:00
Joakim Erdfelt f7b212abb0 Issue #3884 - Pure WebSocketFrameListener should not process Continuation events
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-17 14:34:51 -05:00
Joakim Erdfelt f20d403480 Issue #3876 - Additional testcase
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-16 13:04:19 -05:00
Joakim Erdfelt ec9f4ef392 Issue #3876 - WebSocket Partial Listener testcases and fix
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-07-16 07:07:55 -05:00
Lachlan d8164a1728
Merge pull request #3836 from eclipse/jetty-9.4.x-3835-WebSocketSession-LifeCycle
Issue #3835 - ensure WebSocketSessions are always stopped
2019-07-04 12:59:49 +10:00
Lachlan Roberts 062444630f Merge remote-tracking branch jetty-9.4.x into jetty-9.4.x-3835-WebSocketSession-LifeCycle
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-04 11:15:23 +10:00
Lachlan Roberts d69bf31494 Issue #300 - fix test expectation after CompressExtension changes
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-04 11:10:24 +10:00