Added the concept of UpgradeFrom and UpgradeTo connections that support
transferring a buffer with content before opening new connection.
Aded EndPoint.update method as utility
+ test performs a client upgrade + 2 websocket frames all at once.
not waiting for the upgrade response before sending those frames.
+ currently set to @Ignore until we can address how to copy this extra
buffer information from the Http side to the WebSocket side.
+ Adding appropriate locale settings to testcases to prevent
machine specific locale from changing the expectations.
Bug: 496006
Also-by: Kristian Rosenvold <kristian@zenior.no>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
exceptions
+ Making JSR onOpen close and use onError properly, as well we
unwrapping the InvocationTargetException cause as to WHY the call to
onOpen failed.
+ Since SCI adds filters, but init() isn't run till later, that means
the context attribute for the WebSocketUpgradeFilter isn't present
during jsr356 runs. Added ability for manual filter creation to call
setToAttribute() as a pre-init step, allowing the init() itself to
bypass the set to attribute for that specific filter instance.
+ This also means ServletException is now thrown out from the
various configureContext() static methods.
+ After talking it through with Simone, swapping out 'global' init-param
with a bit more robust 'contextAttributeKey' to handle the automatic
context.setAttribute() of the filter itself.
As simply having a filter in the web.xml makes it alive, but nothing
is wired up into it, and accessing the filter instance via the
context metadata seems impossible. So we made the init-param for
'contextAttributeKey' important and required, but with defaulting
and validation checks.
+ Making key also work inside of WEB-INF/web.xml via context params
+ Making WebSocketUpgradeFilter generic enough to be used in a
web.xml descriptor
+ Adding global={bool} init-param on WebSocketUpgradeFilter to aid
library developers and end users more ways to tweak the filter
order
+ Fixing onOpen context classloader to be that of the context
that started the WebSocketUpgradeFilter (which will be the
same as the WebAppContext in most cases)
+ Exposing 2 new automatically added userProperties
* "javax.websocket.endpoint.localAddress"
* "javax.websocket.endpoint.remoteAddress"
these are both java.net.InetSocketAddress objects
* Using Servlet 3.1's ServletContext.addFilter() mechanisms with its
FilterRegistration to encourage the WebSocketUpgradeFilter to be
first in the filter chain.
Note: this is possible, but can be overridden by another call
to the same ServletContext.addFilter() using the same techniques
to put something in front of the WebSocketUpgradeFilter.