Register websocket endpoints for /mapping/ for /mapping/* servlets#2326
Register websocket endpoints for /mapping/ for /mapping/* servlets#2326Artur- wants to merge 2 commits intoAtmosphere:master-deprecatedfrom
Conversation
…vlets" This reverts commit 14367ba.
Previously for a servlet mapped using /mapping/*, there were mappings done for:
* /mapping
* /mapping/{path1}
* /mapping/{path1}/{path2}
etc
which do not match /mapping/
Tomcat disallows registering websocket endpoints using a trailing slash, except
for /servletMapping/. According to the code this is because
"As per EG discussion, all other empty segments are invalid"
|
Interesting... in what way as / or /servlet/ should be valid mappings? |
|
@Artur- Actually do you have a test/app I can play with that fail to deploy properly? The issue here is we may need to bump the release to |
|
Have not tested with atmosphere samples but I guess if you deploy a servlet to /* and try to use / for the websocket connection, it won’t work |
|
Static analizer in IntelliJ IDEA found that regexp for cleaning servlet path contains unclosed character class: @Artur- you can try to use this fixed pattern: private final static Pattern SERVLET_PATH_PATTERN = Pattern.compile("([/]?[a-zA-Z_0-9.]+?|[/]\\*\\*)+");Does this solve your issue? |
|
@Artur- ping |
|
The core problem: Deploying a servlet using "/*" should deploy a websocket endpoint at |
But where does this requirement come from?
This means that, as a minimum, there is no difference beetwen |
|
JSR356AsyncSupport.java: For Might be that a |
Another attempt for #2316
Only adds a root mapping for the servlet and not the unsupported
/{path1}/{path2}/type paths