Commit Graph

414 Commits

Author SHA1 Message Date
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
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
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
Joakim Erdfelt ae21126cad Updating to version 9.4.20-SNAPSHOT 2019-06-10 13:40:17 -05:00
Joakim Erdfelt afcf563148 Updating to version 9.4.19.v20190610 2019-06-10 11:17:56 -05: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 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 c40a303e2c allow live configuration of maxMessageSizes on JettyWebSocketSession
and set the configuration on supplied CoreClient to the Javax client container

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-05-16 15:50:20 +10:00
lachan-roberts 5f4c6c3b94 Issue #3374 - comments, name changes and fixes to timeout algorithm
Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-05-09 00:05:57 +02:00
Joakim Erdfelt 734be56938 Updating to version 9.4.19-SNAPSHOT 2019-04-29 16:27:23 -05:00
Joakim Erdfelt e1bc35120a Updating to version 9.4.18.v20190429 2019-04-29 15:40:33 -05:00
Joakim Erdfelt 05bb111580 Updating to version 9.4.18-SNAPSHOT 2019-04-18 15:59:49 -05:00
Joakim Erdfelt aa1c656c31 Updating to version 9.4.17.v20190418 2019-04-18 14:44:28 -05:00
Joakim Erdfelt 79537a5f51 Updating to version 9.4.17-SNAPSHOT 2019-04-11 11:00:24 -05:00
Joakim Erdfelt e0aa4ae4c0 Updating to version 9.4.16.v20190411 2019-04-11 10:01:26 -05:00
Simone Bordet 40c2e76786 Merged branch 'jetty-9.4.x' into 'jetty-10.0.x'. 2019-04-06 13:45:54 +02:00
Simone Bordet 1b384329ae Fixes #3526 - Request locale not retained in WebsocketUpgrade request.
Trivial fix, the locale was not copied from the HTTP requets to the
WebSocket upgrade request.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-04-05 17:50:41 +02:00
Lachlan Roberts 81960e3da8 Issue #3484 - make WebSocketServlet generic
WebSocketServlet could only be used with the jetty-websocket-api
make this generic and add implementation in websocket-server

this prevents jetty-websocket-server from needing to use core classes
can cause class cast exceptions from a webapp due conflicts between the
clients version of core classes and those provided by the container

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-03-28 16:22:10 +11:00
lachan-roberts 0d570dd6b6 Issue #3478 - changes from review
ExtensionStack.negotiate now differentiates between incorrect
extension config offered or incorrect config from negotiation

adding more BadMessageException cases

Signed-off-by: lachan-roberts <lachlan@webtide.com>
2019-03-22 15:42:39 +11:00
Lachlan Roberts eb4f7c000f Issue #3465 - internal WebSocket extensions
do not allow internal extensions to be offered by the client
do not validate internal extensions

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-03-21 12:33:53 +11:00
Lachlan Roberts 26e7881dbd Issue #3465 - Negotiation of WebSocket extensions
default behaviour of Negotiation no longer includes all of the
offered extensions as the negotiated extensions but it now takes
only the first extension if there are multiple of the same name,
this is now done when the negotiation is created and can be overwritten
by the negotiator

Throw exception on websocket errors so the proper status code can
be reported back to the client

fix to checking for multiple negotiated extensions of the same name

added tests for core and jetty websockets for the negotiation

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-03-21 11:41:01 +11:00
Lachlan Roberts 403bdb70ea Merge remote-tracking branch 'eclipse/jetty-10.0.x' into jetty-10.0.x-3462-websocketclient-validation
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-03-19 11:54:19 +11:00
Lachlan Roberts 20e9770b73 Issue #3458 - testing of Jetty WebSocket API ExtensionConfig
wire up the jetty-api extensions by copying the ExtensionConfig from
the jetty-api upgrade request to the core upgrade request

make UpgradeListener interface methods default for convenience

introduce test to test the functionality of API ExtensionConfig

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-03-18 15:24:23 +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 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 c63a578c29
Merge pull request #3413 from lachlan-roberts/jetty-10.0.x-3412-WebSocketSession-Customizer
Issue #3412 - WebSocket CoreSession Customizer
2019-03-06 10:09:50 +11:00
Lachlan Roberts 5ecd512a90 Issue #3412 - always customize WSChannel directly after creation
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-03-01 15:47:23 +11:00
Joakim Erdfelt e476cec6d3 Issue #1676 - Removing deprecated methods and classes
+ Changing usages of JVM deprecated classes / methods as well
+ Cleaning up test cases and javadoc
+ Removing test methods that rely on deprecated and now removed concepts

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
2019-02-28 17:54:28 -05:00
Joakim Erdfelt 9cdb59d4d7 Updating to version 9.4.16-SNAPSHOT 2019-02-15 13:35:15 -05:00
Joakim Erdfelt eb70b24016 Updating to version 9.4.15.v20190215 2019-02-15 11:53:00 -05:00
Simone Bordet b9f89af847 Fixes #3320 - Review Jetty 10 module-info.java.
Reviewed module-info.java files.
For those that have a "requires static" added a comment about
why the dependency is optional.
Rearranged directives in alphabetical order.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-08 17:30:27 +01:00
Simone Bordet 33f314e9f5 Issue #3162 - Use Jetty specific Servlet API jar.
Updated to jetty-servlet-api:4.0.1, based on javax.servlet 4.0.1.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
2019-02-04 18:51:51 +01:00
Joakim Erdfelt c30c8d4339 Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-3162_jetty_servlet_api
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>

# Conflicts:
#	jetty-client/pom.xml
#	jetty-http/pom.xml
#	jetty-http2/http2-client/pom.xml
#	jetty-http2/http2-http-client-transport/pom.xml
#	jetty-http2/http2-server/pom.xml
#	jetty-osgi/test-jetty-osgi/pom.xml
#	jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-with-custom-class.xml
#	jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty.xml
#	jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootHTTP2Conscrypt.java
#	jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithAnnotations.java
#	jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithJavaxWebSocket.java
#	jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithWebSocket.java
#	jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestOSGiUtil.java
#	jetty-quickstart/pom.xml
#	jetty-servlets/pom.xml
#	jetty-util/pom.xml
#	jetty-websocket/javax-websocket-client/pom.xml
#	jetty-websocket/javax-websocket-server/pom.xml
#	jetty-websocket/jetty-websocket-server/pom.xml
#	pom.xml
2019-01-30 11:56:58 -06: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
Lachlan Roberts aa1d6ff9cd WebSocketMapping refactor changes from review
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-25 17:11:27 +11:00
Lachlan Roberts 0c85b3138f rename of WebSocketResources to WebSocketComponents
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-25 11:57:03 +11:00
Lachlan Roberts e98809c990 javax WebSocketMappings now stored in ContextHandler attributes
WebSocketMappings are now stored as attributes in the ContextHandler

init params can be set on the filterHolder to specify what mapping
should be used

the default mapping is stored with attribute key
WebSocketMapping.DEFAULT_KEY and ensureFilter now doesn't ensure there
is an UpgradeFilter registered at "/*" but checks that there is an
UpgradeFilter using the default mapping

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-24 15:10:13 +11:00
Lachlan Roberts 1c999a1794 added missing licence headers
fixed todo with default WebSocketUpgradeFilter path mapping

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-24 11:50:25 +11:00
Lachlan Roberts 90003dee13 Issue #3182 - restored old websocket example files
added new test for these example files

added register and setCreator methods in WebSocketServlet to
give more compatibility with old api

implemented isUserInRole in UpgradeHttpServletRequest to get
example working

made the JettyWebSocketTest more clear

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-23 18:43:54 +11:00
Lachlan Roberts b06601e5f1 disable checks for duplicate websocket mappings
throwing on adding of a duplicate websocket mapping causes problems
in EndpointViaConfigTest where we can add mappings even if they have
already been discovered by annotation

added a todo to review why we can't implement this check

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-23 10:18:42 +11:00
Lachlan Roberts 74a5cfa190 remove the word default from all WebSocketServletFactory methods
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-22 18:32:14 +11:00
Lachlan Roberts 15c6f5250d do not set WebSocketMapping in WSUpgradeFilter if already set
the WSUpgradeFilter now has to be registered at "/" or "/*"

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-22 18:17:33 +11:00
Lachlan Roberts 3c2f728574 move check for duplicate mappings to WebSocketMapping class
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-22 18:08:31 +11:00
Lachlan Roberts 4008005a0e Jetty WebSockets no longer use shared mapping
mapping is now created for each WebSocketServlet

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-22 11:55:18 +11:00
Lachlan Roberts e1674cf4b6 separate out resources from the WebSocketMapping
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
2019-01-22 11:39:53 +11:00
Greg Wilkins f16789b101 Issue #3167 cleanups after merge (in #2175)
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-16 15:19:36 +11:00
Greg Wilkins 12655a0944 Working BrowserDebugTool for jetty websocket API
Plus fixes for 10.0.x

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-15 15:54:09 +11:00
Greg Wilkins e1daad1599 Merge branch 'jetty-10.0.x' into jetty-10.0.x-3167-websocket-mapping
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-15 13:31:11 +11:00
Greg Wilkins 3246d07ca9 Revert "Working BrowserDebugTool for jetty websocket API"
This reverts commit c320e020d2.
2019-01-15 13:14:53 +11:00
Greg Wilkins 664ddef6fd Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-10.0.x-3167-websocket-mapping
Signed-off-by: Greg Wilkins <gregw@webtide.com>
2019-01-15 09:44:53 +11:00