Commit Graph

3327 Commits

Author SHA1 Message Date
Greg Wilkins 46a3368f3b
Issue #2578 - Listener behavior cleanup (Jetty 10.0.x) (#3966)
* Avoid creating listener list for rarely used requestAttributeListener

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

* Issue #3964

Keep a list of EventListeners in the AbstractConnector to make it
more efficient to add and iterate over them.

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

* Issue #2578 EventListener

Use addEventListener rather than bespoke listener methods.
Support getEventListenerBeans at Container level for fast lookup
improve javadoc

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

* Issue #2578 EventListener

fixed test
more javadoc

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

* Issue #2578 EventListener

fixed tests

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

* Issue #3964

Don't use null for empty lists of listeners

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

* fix merge

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

* Issue #2578 EventListener

Resolve differences between eventListeners added as beans and beans
added as EventListeners.   The behaviour should now be the same
regardless of how they listener is added and all listeners are now
beans.

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

* Issue #2578 EventListener

Add only SelectorManager listeners to manager from connector

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

* Issue #2578 EventListener

Fixed javadoc

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

* Issue #2578 EventListener

removed old TODO

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

* Issue #2578 EventListener

connector cannot be null

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

* Issue #2578 EventListener

javadoc

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

* Issue #3964

AbstractConnector keeps a specific list of HttpChannel.Listeners
to avoid Connection.Listeners and MBean listeners being added to
the HttpChannel listener list.

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

* Issue #2578 EventListener

fixed merge

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

* fixed javadoc

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

* Issue #2578 EventListener

removed the ability to set/clear context listeners
Instead just remove non-durable ones.

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

* Issue #3964 Listeners

Simplified listener handling by avoiding null connector, previously
only needed for testing.

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

* fixed bad merge

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

* Issue #3964 Listeners

Fixed test that assumed HttpChannel listeners were not cleared by a recycle

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

* Issue #3964 Listeners

Separated out durable vs cyclic HttpChannel.Listeners, so as to
simplify handling.

Deprecated cyclic HttpChannel.Listeners, as I'm not sure the channel is
the right place for them.

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

* removed deprecated cyclic HttpChannel listeners

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

* removed deprecated cyclic HttpChannel listeners - import

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

* Issue #4003 Cleanup quickstart

* Fixed tests that scan for "Started" on console

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

* updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-11-13 11:04:38 +11: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 544ad0a28a
Fixes #4248 - WebSocketClient UpgradeResponse.isSuccess never set true
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-11-12 10:14:51 -06:00
Joakim Erdfelt 5de1289ac0
Merge branch 'release-9.3.28' into jetty-9.3.x 2019-11-07 12:10:00 -06:00
Joakim Erdfelt 0df21b6e86
Merge branch 'jetty-9.2.x' into jetty-9.3.x
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	VERSION.txt
#	aggregates/jetty-all/pom.xml
#	apache-jsp/pom.xml
#	apache-jstl/pom.xml
#	examples/async-rest/async-rest-jar/pom.xml
#	examples/async-rest/async-rest-webapp/pom.xml
#	examples/async-rest/pom.xml
#	examples/embedded/pom.xml
#	examples/pom.xml
#	jetty-alpn/jetty-alpn-client/pom.xml
#	jetty-alpn/jetty-alpn-server/pom.xml
#	jetty-alpn/pom.xml
#	jetty-annotations/pom.xml
#	jetty-ant/pom.xml
#	jetty-cdi/pom.xml
#	jetty-client/pom.xml
#	jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTLSTest.java
#	jetty-continuation/pom.xml
#	jetty-deploy/pom.xml
#	jetty-distribution/pom.xml
#	jetty-fcgi/fcgi-client/pom.xml
#	jetty-fcgi/fcgi-server/pom.xml
#	jetty-fcgi/pom.xml
#	jetty-http-spi/pom.xml
#	jetty-http/pom.xml
#	jetty-http2/http2-alpn-tests/pom.xml
#	jetty-io/pom.xml
#	jetty-io/src/main/java/org/eclipse/jetty/io/ssl/SslConnection.java
#	jetty-jaas/pom.xml
#	jetty-jaspi/pom.xml
#	jetty-jmx/pom.xml
#	jetty-jndi/pom.xml
#	jetty-jsp/pom.xml
#	jetty-jspc-maven-plugin/pom.xml
#	jetty-maven-plugin/pom.xml
#	jetty-monitor/pom.xml
#	jetty-nosql/pom.xml
#	jetty-osgi/jetty-osgi-alpn/pom.xml
#	jetty-osgi/jetty-osgi-boot-jsp/pom.xml
#	jetty-osgi/jetty-osgi-boot-warurl/pom.xml
#	jetty-osgi/jetty-osgi-boot/pom.xml
#	jetty-osgi/jetty-osgi-httpservice/pom.xml
#	jetty-osgi/pom.xml
#	jetty-osgi/test-jetty-osgi-context/pom.xml
#	jetty-osgi/test-jetty-osgi-webapp/pom.xml
#	jetty-osgi/test-jetty-osgi/pom.xml
#	jetty-plus/pom.xml
#	jetty-proxy/pom.xml
#	jetty-quickstart/pom.xml
#	jetty-rewrite/pom.xml
#	jetty-runner/pom.xml
#	jetty-security/pom.xml
#	jetty-server/pom.xml
#	jetty-servlet/pom.xml
#	jetty-servlets/pom.xml
#	jetty-spdy/pom.xml
#	jetty-spdy/spdy-client/pom.xml
#	jetty-spdy/spdy-core/pom.xml
#	jetty-spdy/spdy-example-webapp/pom.xml
#	jetty-spdy/spdy-http-client-transport/pom.xml
#	jetty-spdy/spdy-http-common/pom.xml
#	jetty-spdy/spdy-http-server/pom.xml
#	jetty-spdy/spdy-server/pom.xml
#	jetty-spring/pom.xml
#	jetty-start/pom.xml
#	jetty-util-ajax/pom.xml
#	jetty-util/pom.xml
#	jetty-webapp/pom.xml
#	jetty-websocket/javax-websocket-client-impl/pom.xml
#	jetty-websocket/javax-websocket-server-impl/pom.xml
#	jetty-websocket/pom.xml
#	jetty-websocket/websocket-api/pom.xml
#	jetty-websocket/websocket-client/pom.xml
#	jetty-websocket/websocket-common/pom.xml
#	jetty-websocket/websocket-server/pom.xml
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/browser/BrowserDebugTool.java
#	jetty-websocket/websocket-servlet/pom.xml
#	jetty-xml/pom.xml
#	pom.xml
#	tests/pom.xml
#	tests/test-continuation/pom.xml
#	tests/test-integration/pom.xml
#	tests/test-jmx/jmx-webapp-it/pom.xml
#	tests/test-jmx/jmx-webapp/pom.xml
#	tests/test-jmx/pom.xml
#	tests/test-loginservice/pom.xml
#	tests/test-quickstart/pom.xml
#	tests/test-sessions/pom.xml
#	tests/test-sessions/test-hash-sessions/pom.xml
#	tests/test-sessions/test-jdbc-sessions/pom.xml
#	tests/test-sessions/test-mongodb-sessions/pom.xml
#	tests/test-sessions/test-sessions-common/pom.xml
#	tests/test-webapps/pom.xml
#	tests/test-webapps/test-jaas-webapp/pom.xml
#	tests/test-webapps/test-jetty-webapp/pom.xml
#	tests/test-webapps/test-jndi-webapp/pom.xml
#	tests/test-webapps/test-mock-resources/pom.xml
#	tests/test-webapps/test-proxy-webapp/pom.xml
#	tests/test-webapps/test-servlet-spec/pom.xml
#	tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml
#	tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml
#	tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml
#	tests/test-webapps/test-webapp-rfc2616/pom.xml
2019-11-07 12:09:39 -06:00
Lachlan d0f74c5532
Issue #4124 - autobahn tests for jetty, javax websocket APIs (#4147)
- do not select duplicate extensions in javax default Configurator
- correctly copy payload for ping frames in jetty & javax frame handlers
- add ByteBuffer to javadoc for onMessage in jetty api
- cleaned up some test logging for EventSocket
- add autoFragment and maxFrameSize settings to WebSocketPolicy
- fix early validation for multiple extensions in setExtensions

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-11-07 11:06:14 +11:00
Lachlan 2310196532
Issue #1777 - configuration for jetty-10 WebSocketClient to be stopped at shutdown
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-11-07 11:02:25 +11:00
Joakim Erdfelt 43d95cd984 Updating to version 9.3.29-SNAPSHOT 2019-11-05 13:02:10 -06:00
Joakim Erdfelt d7dd68d6e9 Updating to version 9.3.28.v20191105 2019-11-05 11:46:40 -06:00
Joakim Erdfelt b17439c731 Updating to version 9.2.30-SNAPSHOT 2019-11-05 11:23:21 -06:00
Joakim Erdfelt 36c95fdd43 Updating to version 9.2.29.v20191105 2019-11-05 10:43:15 -06:00
Joakim Erdfelt c980e3dd34
Fixing compilation issue
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-10-30 17:18:03 -05: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
Lachlan f6f423f558
Issue #4152 - make WS Parser autoFragment data frames to maxFrameSize (#4219)
* Issue #4152 - make WS Parser autoFragment data frames to maxFrameSize

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

* Issue #4152 - fix broken tests

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

* Issue #4152 - fix broken tests

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

* changes from review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-10-22 16:17:50 +11:00
Lachlan 02276113f6
Issue #4214 - fix WS flaky test ClientConnectTest (#4215)
* Issue #4214 - fix flaky ClientConnectTest and change WS connectTimeout

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

* Issue #4214 - changes from review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-10-18 10:11:57 +11: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 d47264960e
Issue #3734 - throw ISE for WebSocket suspend after close (#4095)
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-10-08 09:47:48 +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 d7a189fa18 Updating to version 10.0.0-SNAPSHOT 2019-10-03 12:05:26 -05:00
Joakim Erdfelt fd6a2cb9f6 Updating to version 10.0.0.alpha1 2019-10-03 11:25:06 -05:00
Joakim Erdfelt 6fc42d8ba2 Merge branch 'release-9.4.21' into jetty-9.4.x 2019-10-01 13:35:43 -05:00
Lachlan Roberts b83dd8472d Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-10-01 16:06:58 +10: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
Lachlan Roberts aa417f939e Fix WebSocket CompressExtension releaseDeflater() bug.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-27 10:18:35 +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 Roberts af081459ee Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-25 15:06:17 +10: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
Simone Bordet f10325ea50
Merge pull request #3959 from eclipse/jetty-10.0.x-3952-server_direct_heap_bytebuffers
Fixes #3952 - Server configuration for direct/heap ByteBuffers.
2019-09-23 15:24:47 +02: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 f10ff81d1c
Fix Secure javax.websocket Client examples (#4035)
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-18 10:42:32 +10:00
Simone Bordet 0eec727a09 After review, renamed *directBuffers to *directByteBuffers.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-09-17 12:16:10 +02:00
Simone Bordet 1ef4a416b5 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-3952-server_direct_heap_bytebuffers'. 2019-09-16 12:26:26 +02:00
Lachlan b027aa5afa
Fixes #3705 - revert ClientUpgradeRequest error handling logic (#4090)
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-16 17:21:33 +10:00
Lachlan Roberts 22fba9aa91 Issue #3106 - deprecate old WebSocket stats mechanism
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-13 11:28:05 +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 Roberts 5a08e48fe7 don't duplicate checks in handshake selector
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-12 16:46:47 +10:00
Lachlan Roberts 17b17cb2b9 clean up websocket handshakers
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-12 15:22:56 +10:00
Lachlan Roberts 3068b4c8ae fix build issues
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-12 11:04:05 +10:00
Simone Bordet d69a1f0f58 Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-3537-bootstrap_websocket_http2'. 2019-09-12 00:11:01 +02:00
Lachlan Roberts 72ce7456eb optimize HandShakeSelector
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-12 08:07:31 +10:00
Lachlan Roberts 387faa7e33 clean up websocket jetty-logging.properties files
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-09-11 18:02:18 +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
康智冬 49ba6d1acb fix typo and grammar (#4045)
Signed-off-by: KangZhiDong <worldkzd@gmail.com>
2019-09-02 14:29:50 -04:00
Joakim Erdfelt 4e80748b3b Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/ClientContainer.java
2019-08-28 15:01:41 -05:00
Joakim Erdfelt 2b72f08f1b
Merge pull request #4019 from eclipse/jetty-9.4.x-155-jsr-websocket-client-ssl-init
Issue #155 - Adding public ClientContainer(HttpClient) constructor
2019-08-28 14:31:51 -05:00
Joakim Erdfelt 4829498eab Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/extensions/ExtensionFactory.java
#	jetty-websocket/websocket-core/src/main/java/org/eclipse/jetty/websocket/core/WebSocketExtensionRegistry.java
#	jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketServerFactory.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/browser/BrowserDebugTool.java
#	jetty-websocket/websocket-servlet/src/main/java/org/eclipse/jetty/websocket/servlet/WebSocketServletFactory.java
2019-08-28 12:43:11 -05:00
Joakim Erdfelt 37e7884382 Issue #4020 - Applying change requested from PR review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-28 12:36:07 -05:00
Joakim Erdfelt e56d91196d Issue #4020 - Adding JMX to BrowserDebugTool to test dump
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-28 12:31:33 -05:00
Joakim Erdfelt 2979ed5046 Fixes #4020 - Satisfy Container LifeCycle dumpable behaviors
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-27 20:25:10 -05:00
Greg Wilkins 8f383faf78
Issue #3872 Javax Websocket Packaging (#3873)
* Issue #3872 Javax Websocket Packaging

Moved JaxaxWebSocketConfiguration and SCI to config package.
Limited classpath exposure in JavaxConfiguration (more needed)
Updated tests with work around for those that needs more classes exposed

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

* Issue #3872 Javax Websocket Packaging

Moved all remaining classes from org.eclipse.jetty.websocket.javax.server
to org.eclipse.jetty.websocket.javax.server.internal.

This works when running on the classpath, but the tests fail when running
on the modulepath (eg in commandline mvn run).   The issue appears to be
that the tests don't load test classes from WEB-INF/lib or WEB-INF/classes.
Instead the test classes were themselves in  org.eclipse.jetty.websocket.javax.server,
which is no longer exported from module-info.java.

The hacked "fix" for this has been to create a org.eclipse.jetty.websocket.javax.server.tests
package which is exported and to move all the tests to that.  A better fix is needed.

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

* Issue #3872 Javax Websocket Packaging

improve comments
tighten exposed classes more

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

* Issue #3872 - fixing tests

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

* Issue #3872 - move ContainerDefaultConfigurator to config package

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

* Issue #3873 - fix javax websocket test classloader issues

move websocket endpoints for test webapps to com.acme.websocket package

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-08-28 10:03:46 +10:00
Joakim Erdfelt 6bcfa2dc6e Fixes #4020 - Deprecate ExtensionFactory
+ This class is removed in Jetty 10 anyway.
+ If all you want is to access available extension names
  then use the Factory.getAvailableExtensionNames() method
  (which exists in Jetty 10.0.0 as well)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-27 13:25:08 -05:00
Joakim Erdfelt 149d9d4862 Fixes #4020 - Revert ExtensionFactory change to interface.
+ The change in commit 30dc103a12
  was done to allow the InflaterPool and DeflaterPool
  to be managed by the Jetty lifecycle.
+ This restore the original abstract class ExtensionFactory.
+ Had to break the traditional LifeCycle usage for a more
  non-traditional one in order to both, not break this existing
  API, and not introduce jetty-util to the webapp classloader.
+ This will restore API / binary compatibility for other
  projects, like spring-boot.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-26 13:40:32 -05: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
Joakim Erdfelt f692af3d53 Issue #155 - Adding public ClientContainer(HttpClient) constructor
+ This helps with programmatic configuration of HttpClient
  layer (for SSL and Proxy).

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-23 11:55:13 -05:00
olivier lamy cf592469aa checkstyle fixes.
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-23 13:09:15 +10:00
Joakim Erdfelt 12e1473fd0 Adding reference to javax.websocket issue
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-22 17:04:01 -05:00
Joakim Erdfelt 6aaf22ec6c Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-22 17:02:19 -05:00
Joakim Erdfelt 45dfd14cd5 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x 2019-08-22 16:45:25 -05:00
Joakim Erdfelt 5bcbe0f9d9 Adding javax.websocket secure client example
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-08-22 16:45:04 -05:00
olivier lamy a36af67abf Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-08-22 20:45:57 +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 Roberts eabae232e5 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-08-20 12:59:31 +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 7d7d932288 Issue #3968 - remove public from methods in ReadState
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-08-15 09:16:05 +10:00
Lachlan Roberts 11d1ad6504 disable flaky test WebSocketConnectionStatsTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-08-15 08:04:57 +10:00
Simone Bordet 985d98296b Merged branch 'jetty-10.0.x' into 'jetty-10.0.x-3952-server_direct_heap_bytebuffers'. 2019-08-14 15:45:49 +02:00
Simone Bordet 01af85db42 Issue #3537 - Bootstrapping WebSockets with HTTP/2.
Implemented upgrade logic for WebSocket over HTTP/2.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-08-14 14:57:21 +02:00
Lachlan 2a109dccbc
Issue #3968 - prevent ReadPending and ISE from AbstractWebSocketConnection (#3979)
* Issue #3968 - websocket suspend fix and cleanups

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

* Issue #3968 - fixed race conditions when using websocket ReadState

combine the previous ReadMode into ReadState by using ReadState.Action
which is returned from ReadState.getAction(ByteBuffer) where an atomic
decision is made of what action to do

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-08-14 21:28:35 +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
Simone Bordet a700907522
Issue #250 - Implement HTTP CONNECT for HTTP/2. (#3539)
Fixes #250 - Implement HTTP CONNECT for HTTP/2.

Modified HTTP/2 implementation to support the CONNECT method.
Implemented semantic defined by RFC 8441.
Implemented section 8.3 of RFC 7540.
Introduced HTTP2Client.streamIdleTimeout.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-08-13 19:07:04 +03:00
Lachlan Roberts ee40006a5e remove NullMessage from websocket jetty-9.4.x merge
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-08-13 15:28:20 +10:00
Simone Bordet 5ccaea3c74 Fixes #3952 - Server configuration for direct/heap ByteBuffers.
Updated server-side to use direct/heap ByteBuffers based on
getters and setters in the relevant components.
Made HTTP/1.1, HTTP/2, and WebSocket use the same mechanism.

Removed unused obsoleted methods:
* EndPoint.isOptimizedForDirectBuffers()
* HttpTransport.isOptimizedForDirectBuffers()
* HttpOutput.Interceptor.isOptimizedForDirectBuffers()
* HttpChannel.useDirectBuffers()

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-08-12 17:20:50 +02:00
Joakim Erdfelt 3ee665700d Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/CloseTrackingEndpoint.java
#	jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/client/WebSocketClientTest.java
#	jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/JettyAnnotatedEventDriver.java
#	jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/events/JettyListenerEventDriver.java
2019-08-07 05:28:06 -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
Lachlan Roberts bab274be85 fix to PartialListenerTest from merge
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-08-02 15:15:57 +10:00
olivier lamy 41e5b9f16c disable merged test PartialListenerTest from 9.4.x
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-02 14:24:22 +10:00
olivier lamy 5be9f1a927 Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-08-02 13:46:45 +10:00
olivier lamy c08b7b9e56 fix compilation
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-08-01 20:29:44 +10: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
olivier lamy 6df9ef3a15 Updating to version 10.0.0-SNAPSHOT 2019-07-12 06:54:56 +10:00
olivier lamy 8cbfd51e80 Updating to version 10.0.0-alpha0 2019-07-12 06:54:56 +10:00
olivier lamy a34e641a27 Updating to version 10.0.0-SNAPSHOT 2019-07-11 17:20:27 +10:00
olivier lamy 2e58f2f515 Updating to version 10.0.0-alpha0 2019-07-11 14:19:45 +10:00
olivier lamy 352d1e7c3b fix checkstyle
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-07-09 18:27:14 +10:00
Lachlan Roberts 9449008581 Issue #3849 - only notify onError for local errors
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-05 16:06:56 +10:00
Lachlan Roberts 6eee5ad415 Merge remote-tracking branch 'eclipse/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-04 14:30:45 +10: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 d4217cb20b Merge remote-tracking branch jetty-9.4.x into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-04 12:39:03 +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
Lachlan Roberts bb1a260fa5 Merge remote-tracking branch jetty-10.0.x into jetty-10.0.x-300-CompressionPool
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-04 10:22:10 +10:00
Lachlan Roberts 50c18798ba Merge remote-tracking branch 'eclipse/jetty-9.4.x' into jetty-9.4.x-300-CompressionPool
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-04 10:19:54 +10:00
Greg Wilkins d744d097de
Checkstyle cleanup (#3847)
* Checkstyle cleanup
* fixed bug from reformat
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-07-03 17:24:08 +02:00
Greg Wilkins 9fe27eb8e3 Updated all arrays after merge of #3846
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-07-03 17:23:02 +02:00
Jan Bartel 5568f833e7 Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-07-03 16:53:00 +02:00
Jan Bartel bb7fb48f08
Fix checkstyle warnings for tests. (#3846)
Signed-off-by: Jan Bartel <janb@webtide.com>
2019-07-03 16:42:20 +02:00
Lachlan Roberts 1554b3dbb1 Issue #3835 - add default methods to WebSocketSessionListener
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-03 11:33:32 +10:00
Lachlan Roberts 07ee1d8fc6 Merge remote-tracking branch jetty-9.4.x into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-03 11:21:30 +10:00
Lachlan f3f13c4ca9
Issue #2061 - fail current entry in CompressExtension on failure (#3830)
* Issue #2061 - fail current entry in CompressExtension on failure

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

* Issue #2061 - do not notify callback failure twice

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-03 11:09:34 +10:00
Lachlan Roberts 196833d15e Issue #3835 - fix SessionTracker dump, add test assertions
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-02 19:06:05 +10:00
Lachlan Roberts 705e1cafe0 Issue #300 - use inflater/deflater pools in CompressExtension
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-02 16:42:50 +10:00
Lachlan Roberts 64eb3217cd Issue #300 - refactor usages of WebSocketComponents
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-02 15:28:58 +10:00
Lachlan Roberts c5172df484 fix RestartContextTest for javax WebSockets
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-02 11:32:08 +10:00
Lachlan cbc4768cae
Issue #3159 - do not copy RSV bits to auto-fragmented frames (#3816)
* Issue #3159 - do not copy RSV bits to auto-fragmented frames

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

* Issue #3159 - warn if DeflateFrameExtension detects autoFragment on

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

* Issue #3159 - automatically set auto-fragment false in DeflateFrameExt

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

* Issue #3159 - automatically set auto-fragment false in DeflateFrameExt

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

* Issue #3159 - add todo

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-01 17:06:32 +10:00
Lachlan ac8910e044
Issue #3809 - ensure abnormal close frame will hard close ws connection (#3819)
* Issue #3809 - ensure abnormal close frame will hard close ws connection

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

* Issue #3159 - signal onError on abnormal status code close

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-01 16:50:56 +10:00
Lachlan Roberts 2383bf4974 Issue #3835 - ensure WebSocketSessions are always stopped
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-07-01 16:40:45 +10:00
Lachlan fa4abfa6bb
Merge pull request #3365 from lachlan-roberts/jetty-10.0.x-3170-websocket-proxy
Issue #3170 - WebSocket Proxy
2019-07-01 11:53:48 +10:00
Olivier Lamy 38a3a51a54
Jetty 10.0.x javadoc fix (testing javadoc plugin SNAPSHOT) (#3831)
* fix javadoc generation with jdk11

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>

* currently disable javadoc:aggregate-jar as do not work yet

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-06-28 10:00:57 +10:00
Lachlan cc4304a0f6
WebSocket core autobahn and MessageHandler refactor (#3802)
* reworked WebSocket autobahn test code and the core MessageHandler

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

* PR #3802 - changes from review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-26 13:47:46 +10:00
Lachlan Roberts 2cf0c8aeb8 Merge remote-tracking branch 'jetty-9.4.x' into jetty-9.4.x-300-CompressionPool
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-25 10:21:43 +10:00
Greg Wilkins b7a7a53a18
Jetty 10.0.x reformat (#3812)
* Removing Legacy Method Separators
* Restyling branch `jetty-9.4.x`
* Applying changes highlighted by checkstyle
* Removing Legacy Method Separators
* Restyling branch `jetty-10.0.x`
* Applying checkstyle changes
* Applying checkstyle changes
* Applying XML restyling
* Restyling XML in branch `jetty-10.0.x`
* Fixing XML codestyle for IntelliJ
* Fixing XML style mistakes
* Fixing XML restyling in branch `jetty-10.0.x`
* Revert "Applying XML restyling"
* Updating checkstyle for XML codestyle
* Revert "Restyling XML in branch `jetty-10.0.x`"

# Conflicts:
#	jetty-xml/src/test/resources/org/eclipse/jetty/xml/configureWithAttr.xml
#	jetty-xml/src/test/resources/org/eclipse/jetty/xml/configureWithElements.xml

* Adding back build-resources
* Reformatting pom.xml files
* Disabling Checkstyle job
* fixed empty string on line wrap
* reformatted with latest intellij style
* misc checkstyle fixes

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-06-24 17:42:39 +02:00
Greg Wilkins 9706d70484
Jetty 9.4.x reformat (#3811)
* Removing Legacy Method Separators
* Restyling branch `jetty-9.4.x`
* Applying changes highlighted by checkstyle
* Applying XML restyling
* Fixing XML codestyle for IntelliJ
* Fixing XML style mistakes
* Revert "Applying XML restyling"
* Updating checkstyle for XML codestyle
* Reformatting pom.xml files
* Fixed empty string from line wraps
* Update intellij style to not do expression relative formatting. Reformatted code based on that.
* Increasing line split on Eclipse IDE Formatter to 512
* Restoring setting on internal default value.
+ IntelliJ will not export settings on things that set to their
  internal default values.
  We want to keep those values as a hedge against future default
  value changes in future releases of IntelliJ.
* Fixing intellij codestyle
* do not allow single line simple methods
* misc checkstyle fixes
* re-exported with correct name and all values

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-06-24 17:40:30 +02:00
Joakim Erdfelt 479eb77f6a
Merge pull request #3797 from eclipse/jetty-10.0.x-remove-deprecated
Remove deprecated in Jetty 10.0.x
2019-06-21 14:27:34 -05:00
Lachlan 3ae6d41a18
WebSocket core cleanup (#3783)
* cleanups of WebSocket core

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

* WebSocket ConfigurationCustomizer now extends ConfigurationHolder

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

* adding isDebugEnabled checks

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-21 10:14:27 +10:00
Joakim Erdfelt fe051bf392 Removing deprecated methods in Jetty 10
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-20 11:41:42 -05:00
Joakim Erdfelt ef36cde4ed Issue #2909 - Remove B64Code
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-20 11:15:04 -05:00
Lachlan Roberts 93b6619f8f fix flaky tests in ClientConnectTest
race of Exception notifications between the CompletableFuture and
the FrameHandler

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-20 18:23:32 +10:00
Lachlan Roberts e305736b02 add request and response to JettyWSFrameHandler on server side
wrap exceptions delivered to jetty connect CompletableFuture

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-20 16:47:11 +10:00
Lachlan Roberts ec4179cf42 fix NPEs in tests from merge
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-20 11:16:45 +10:00
Lachlan Roberts 6f94b72667 fix build problems from bad merge
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-20 09:40:11 +10:00
Lachlan Roberts e67532372c Issue #300 - ensure Sessions are stopped before CompressionPools
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-20 09:09:20 +10:00
Joakim Erdfelt 22b054e0ef Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-websocket/javax-websocket-server-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/server/deploy/WebSocketServerContainerInitializer.java
#	jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/BinaryStreamTest.java
#	jetty-websocket/javax-websocket-server/src/test/java/org/eclipse/jetty/websocket/javax/server/browser/JsrBrowserDebugTool.java
#	jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/NativeWebSocketServletContainerInitializer.java
#	jetty-websocket/websocket-server/src/main/java/org/eclipse/jetty/websocket/server/WebSocketUpgradeFilter.java
2019-06-19 16:54:19 -05:00
Joakim Erdfelt 5e3cecee6f
Merge pull request #3706 from eclipse/jetty-9.4.x-websocket-sci-from-embedded
Issue #3698 - Reworking WebSocket SCI's to be more flexible in embedded
2019-06-19 15:31:59 -05:00
Joakim Erdfelt a847f54cd2
Merge pull request #3744 from eclipse/jetty-9.4.x-3648-websocket-client-ssl
Issue #3648 - SSL based on WebSocket behavior (CLIENT vs SERVER)
2019-06-18 08:05:33 -05:00
Lachlan Roberts 30dc103a12 Issue #300 - manage deflater/inflater pools with ContainerLifeCycle
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-18 12:31:25 +10:00
Lachlan 372ed1455f
Issue #3661 - review of exposed classes in jetty-websocket-server (#3779)
* Issue #3661 - review of exposed classes in jetty-websocket-server

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

* Issue #3762 - cleanups of jetty-websocket-server

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-17 17:12:46 +10:00
Lachlan a18bd12ada Issue #3762 - use the default port of 0 for WebSocket tests
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-17 13:28:38 +10:00
Joakim Erdfelt f05d6cf9ad Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-300-CompressionPool 2019-06-14 08:38:08 -05:00
Joakim Erdfelt 8c0f889abd Issue #3698 - Updating javadoc on .initialize() method purpose/meaning
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-14 08:37:01 -05:00
Joakim Erdfelt 49ee5ac3c0 Merge branch 'jetty-9.4.x' into 'jetty-9.4.x-websocket-sci-from-embedded' 2019-06-14 08:23:42 -05:00
Lachlan Roberts c30c335df3 Issue #300 - shared Inflater/Deflater pools for WebSocket
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-14 16:20:00 +10:00
Joakim Erdfelt 60d8661890 Merge `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	examples/embedded/src/main/java/org/eclipse/jetty/embedded/Http2Server.java
#	jetty-ant/src/main/java/org/eclipse/jetty/ant/AntWebInfConfiguration.java
#	jetty-http/src/test/java/org/eclipse/jetty/http/QuotedCSVTest.java
#	jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/JettyWebAppContext.java
#	jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionDataStore.java
#	jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/OSGiWebInfConfiguration.java
#	jetty-util/src/main/java/org/eclipse/jetty/util/StringUtil.java
#	jetty-util/src/test/java/org/eclipse/jetty/util/StringUtilTest.java
#	jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java
#	jetty-websocket/javax-websocket-tests/src/main/java/org/eclipse/jetty/websocket/javax/tests/WSServer.java
#	jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WSServer.java
#	tests/test-integration/src/test/java/org/eclipse/jetty/test/support/XmlBasedJettyServer.java
2019-06-13 14:14:42 -05:00
Joakim Erdfelt 40e9e053b9
Merge pull request #3768 from eclipse/jetty-9.4.x-3708-stringutil-replace
Issue #3708 - use StringUtil alternatives for known slow JVM impls.
2019-06-13 14:01:35 -05:00
Simone Bordet 2a2a11cd2e Improvements after merge.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-06-13 10:23:55 +02:00
Simone Bordet 790051556f Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-06-13 10:03:54 +02:00
Lachlan 6fcc3d1a77
Issue #3762 - use the default port of 0 for WebSocket tests (#3770)
* Issue #3762 - use the default port of 0 for WebSocket tests

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

* Issue #3762 - use system property to set custom port in xml

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-13 15:43:19 +10:00
Joakim Erdfelt 9e368726d7 Attempting to address stats difference 2019-06-12 15:10:22 -05:00
Joakim Erdfelt fab70bd13c Merge branch 'jetty-9.4.x' of github.com:eclipse/jetty.project into jetty-9.4.x 2019-06-12 12:42:42 -05:00
Joakim Erdfelt aa8c0bb879 Reworking testcase to be more resilient
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-12 12:42:28 -05:00
Joakim Erdfelt 877815e195 Issue #3708 - Adding new methods and converting codebase to use them
+ StringUtil.replace(String, char, char)
+ StringUtil.strip(String, String)
+ URIUtil.encodeSpecific(String, String)
+ URIUtil.decodeSpecific(String, String)
+ TypeUtil.toClassReference(Class)
+ TypeUtil.toClassReference(String)

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-12 09:56:41 -05:00
Joakim Erdfelt 776c093b70 Merge branch 'release-9.4.19' into jetty-9.4.x 2019-06-12 06:44:27 -05:00
Lachlan Roberts e8115268d4 Issue #300 - rework of inflater and deflater pools
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-12 14:21:40 +10:00
Joakim Erdfelt 2ea0bca333 Cleanup of testcase, unable to replicate failure.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-11 13:10:55 -05:00
Lachlan 0d9de28226
Issue #3661 - move WebSocketSessionListener to WebSocket-API
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-11 21:08:52 +10:00
Lachlan 1ead2ee370
Issue #3616 - fix merge back of SessionTracker back to jetty10
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-11 21:07:15 +10:00
Lachlan Roberts e007634e53 Issue #3170 - cleanups of WebSocketProxy and WebSocketProxyTest
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-11 17:12:02 +10:00
Lachlan Roberts 327783e1ce Merge remote-tracking branch 'eclipse/jetty-10.0.x' into jetty-10.0.x-3170-websocket-proxy
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-11 15:17:54 +10:00
Joakim Erdfelt ae21126cad Updating to version 9.4.20-SNAPSHOT 2019-06-10 13:40:17 -05:00
Joakim Erdfelt 68a9498092 Merge branch `jetty-9.4.x` into `jetty-10.0.x`
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-10 11:51:55 -05:00
Joakim Erdfelt afcf563148 Updating to version 9.4.19.v20190610 2019-06-10 11:17:56 -05:00
Joakim Erdfelt 5dbc0bdaa5
Merge pull request #3745 from eclipse/jetty-9.4.x-3743-xmlconfig-locations
Issue #3743 - Using Location based XmlConfiguration where possible
2019-06-10 11:08:51 -05:00
Joakim Erdfelt 1683df2da6 Putting new JMH test in correct place (fix from last merge) 2019-06-10 10:04:30 -05:00
Simone Bordet 826d68e80a Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-06-10 11:41:47 +02:00
Simone Bordet 5346980dbb Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-06-10 11:29:25 +02:00
Joakim Erdfelt 550fb99e86 Issue #3698 - fixing javadoc 2019-06-07 07:01:06 -05:00
Simone Bordet dd79b516f3 Fixes #3750 - NPE in WebSocketClient.toString().
Initializing field `sessionTracker` early to avoid NPE.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-06-07 11:36:42 +02:00
Joakim Erdfelt 986dd77e60 Issue #3698 - Applying changes from PR feedback.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-06 16:44:35 -05:00
Joakim Erdfelt 6686083462 Issue #3743 - Using only Location based XmlConfiguration in Jetty itself
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-06 11:55:01 -05:00
Joakim Erdfelt 631f0cd9f6 Issue #3648 - SSL based on WebSocket behavior (CLIENT vs SERVER)
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-06 11:39:55 -05:00
Lachlan 62eedebd17
Issue #3705 - WebSocket upgrade failure and CompletableFuture refactor
* Issue #3705 - notify WebSocket framehandler on client upgrade failure

getFrameHandler on the ClientUpgradeRequest no longer takes
the upgrade response, the response must be set later if it is
required by the framehandler implementation

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

* Issue #3705 - changes from review

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

* Issue #3705 - throw if FrameHandler could not be created

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

* wip

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

* Issue #3705 - count down the onOpen latch in NetworkFuzzer

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

* Issue #3705 - WebSocket Session CompletableFuture refactor

- sessionFutures for jetty and javax are now implemented using the
futureCoreSession which will occur after onOpen

- the request and response are set on the FrameHandler before the
upgrade

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-06 08:13:33 +10:00
Lachlan Roberts 85aa3424b6 Issue #3712 - rename maxIdleTime usage to idleTimeout for WebSockets
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-05 14:18:47 +10:00
Lachlan Roberts 90e849af76 disable failing testSuspendAfterClose for further review
the WebSocket suspend after close different behaviour from 9 to 10
in jetty-10 an ISE is thrown
in jetty-9 it is a no-op

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-05 13:30:21 +10:00
Lachlan Roberts edcaa4eda7 rename writeIdleTimeout to writeTimeout for javax websockets
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-05 01:48:26 +10:00
Lachlan Roberts bb65167549 Merge remote-tracking branch 'eclipse/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-05 01:34:53 +10:00
Lachlan f282ba4758
Merge pull request #3686 from lachlan-roberts/jetty-10.0.x-3666-errorClose
Issue #3666 - error CloseFrames skip frames in the FrameFlusher queue
2019-06-04 13:43:54 +10:00
Lachlan ac8303c45e
Merge pull request #3637 from lachlan-roberts/jetty-9.4.x-3498-websocket-suspend
Issue #3498 - jetty 9.4 websocket suspend for incoming frames
2019-06-04 13:42:24 +10:00
Joakim Erdfelt a6b2bd86ef Issue #3698 - Changes based on review from @sbordet
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-03 15:52:41 -05:00
Joakim Erdfelt 54888d2541 Issue #3698 - Reworking WebSocket SCI's to be more flexible in embedded
+ Added new SCIOnStartupListener that allows for manual wiring up
  of ServletContainerInitializers (with no bytecode scanning)
  in embedded jetty usages
+ Introduced .initialized(context) and .configure(context) to both of
  the websocket SCIs
+ Moved ClientConnectTest to jetty-websocket-tests
+ Moved WebSocketClientTest to jetty-websocket-tests
+ Made moved tests not use BlockheadServer
+ Made moved tests use new .configure(context, lambda) methods
+ Also allowing javax.websocket.server SCI implementation to
  add ContextDestroyListener during the execution of another
  ServletContextListener.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-06-03 13:31:06 -05:00
Lachlan Roberts 6681da7e74 Issue #3666 - changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-06-03 11:18:41 +10:00
Simone Bordet 567c5a4f55 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-05-30 12:49:47 +02:00
Simone Bordet 0cf91c91e1 Issue #3696 - Unwrap JavaxWebSocketClientContainer.connectToServer() exceptions.
Improved exception unwrapping.
Code cleanups.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-05-29 19:21:00 +02:00
Simone Bordet 3d20d9c51a Merge branch 'jetty-10.0.x-3696-connectToServer-ExecutionException' of https://github.com/lachlan-roberts/jetty.project into lachlan-roberts-jetty-10.0.x-3696-connectToServer-ExecutionException 2019-05-29 19:02:59 +02:00
Michael Hausegger fdcbb214f8 Added tests for decoders
Signed-off-by: Michael Hausegger <hausegger.michael@googlemail.com>
2019-05-29 17:43:19 +02:00
Michael Hausegger 564ac4a2d3 Added Unit Tests for ReflectUtil.
Signed-off-by: Michael Hausegger <hausegger.michael@googlemail.com>
2019-05-29 17:09:45 +02:00
Greg Wilkins 3e0e6a73c7
Some fixes for running cometd6 on jetty-10 (#3702)
* Some fixes from testing cometd-6

Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-05-28 17:08:38 +02:00
Lachlan Roberts 77d95d039c Issue #3696 - unwrap ExecutionException in javax WS connectToServer
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-05-28 11:55:31 +10:00
Lachlan 49356bb5c5
Merge pull request #3660 from lachlan-roberts/jetty-10.0.x-configuration-refactor
jetty-10 WebSocket configuration refactor
2019-05-24 10:40:30 +10:00
Lachlan Roberts e5a6910be4 Issue #3666 - changes from review
- code cleanups
- made SHUTDOWN 1001 status an abnormal close status

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-05-24 05:58:02 +10:00
Lachlan Roberts 9e09f76fda Issue #3666 - error CloseFrames skip frames in the FrameFlusher queue
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-05-24 05:54:49 +10:00
olivier lamy 68fa24e463 fix bad merge
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
2019-05-23 16:31:02 +10:00
Lachlan 19e80ff788
Merge pull request #3685 from lachlan-roberts/jetty-10.0.x-83-sessiontrackingtest-failures
Issue #83 - reworked SessionTrackingTest to fix intermittent failures
2019-05-23 16:10:30 +10:00
olivier lamy d377db5d26 Merge branch 'jetty-9.4.x' into jetty-10.0.x 2019-05-23 14:18:39 +10:00
Lachlan Roberts d6c68c4911 Merge remote-tracking branch 'eclipse/jetty-10.0.x' into jetty-10.0.x-configuration-refactor
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-05-23 09:03:27 +10:00
Lachlan Roberts 52cc4f6c22 Issue #83 - reworked SessionTrackingTest to fix intermittent failures
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-05-22 17:16:52 +10:00
Lachlan Roberts f4990dd0f5 prefer the field and variable name of coreSession instead of session
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-05-22 08:29:05 +02:00
Lachlan Roberts 491ff5eb93 rename WebSocketChannel to WebSocketCoreSession
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-05-22 08:29:05 +02:00
Lachlan Roberts 5f62e0f2db store shared websocket components as attributes and not beans
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-05-21 18:56:53 +10:00
Lachlan Roberts e31009cb06 WebSocketCoreClient no longer stores configuration and can be shared
configuration moved to ClientUpgradeRequest

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-05-21 11:33:06 +10:00