-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
simplify the usage of WebSocketUpgradeFilter in jetty 10 #5413
simplify the usage of WebSocketUpgradeFilter in jetty 10 #5413
Conversation
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
...til-server/src/main/java/org/eclipse/jetty/websocket/util/server/WebSocketUpgradeFilter.java
Outdated
Show resolved
Hide resolved
…WebSocketUpgradeFilter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really convinced this is workable as I'm not sure you can always convert a className into a class at the point you need to.
They might extend the jetty servlet in their application, so the classname may be for something in the webapp, which might not be loadable until started.
Looking at the init param feels safer to me.
Let's discuss.
jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterHolder.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
If a user wants to use the WebSocketUpgradeFilter with a different WebSocketMapping, they can add the ServerContainer manually and put their own WebSocketMapping in. Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is really now just a clean up and rename, rather than a substantive change.
…WebSocketUpgradeFilter Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
@gregw yes but also a change in behaviour, the |
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Now anyWebSocketUpgradeFilter
will use the defaultWebSocketMapping
attribute by default. And we will not add aWebSocketUpgradeFilter
automatically in theJettyWebSocketServletContainerInitializer
if we detect there is already one added.WebSocketUpgradeFilter
mapping init param name and default value.WebSocketUpgradeFilter
it will throw in itsinit()
method.