-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grizzly server filter does not take into account multiple contexts #737
Comments
Here's a fix with the proper behavior...
|
Year and half..... no one wants to leap on this huh? |
Uhm...sometimes it is better to push us more often...sorry. Will try to get to this soon. |
So basically if the attribute name would be different for each
Then the rest of the code could remain as simple is, correct? |
Sorry. I don't know if your fix is good. I know the one I posted works because we replace the class and use ours instead. |
But hopefully you tested... We will eventually. |
@zenbones I tried to test it. Let us know when any issues. Currently, the fix is in 2.1.3. |
In the same Grizzly instance one may have more than one Tyrus server container because you are processing websockets requests on more than one application context / context path. Therefore, in the filter chain will be more than one filter, each associated with a different context path. The handleHandshake() code recognizes this...
However, by this time the attribute holder for the filter context would already have been set true...
..and the next Tyrus filter in the chain will skip and simply invoke the next action. The problem is that...
attributeHolder.setAttribute(ATTR_NAME, true);
...fails to capture the reality of multiple contexts. Rather than a boolean, this should hold the context path of the filter, or a set of context paths of all Tyrus filters tried thus far, and if the current filter's context path is in the set, skip to the next action as the current code does, but, if not, try the handshake.
The text was updated successfully, but these errors were encountered: