-
Bug
-
Resolution: Done
-
Major
-
1.3.0.Beta4
-
None
Problem
Undertow treats domain x alias matching case-sensitively. I believe it directly violates the contract of IETF RFC 1035.
For instance, if one configures these two test applications simplecontext-examples.zip as root content for their respective aliases:
<subsystem xmlns="urn:jboss:domain:undertow:3.0" instance-id="workerXXX"> <buffer-cache name="default"/> <server name="default-server"> <ajp-listener name="ajp" socket-binding="ajp"/> <http-listener name="default" redirect-socket="https" socket-binding="http"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <filter-ref name="server-header"/> <filter-ref name="x-powered-by-header"/> </host> <host name="web1" alias="web1.rhel7GAx86-64"> <location name="/" handler="web1-content"/> <filter-ref name="server-header"/> <filter-ref name="x-powered-by-header"/> </host> <host name="web2" alias="web2.rhel7GAx86-64"> <location name="/" handler="web2-content"/> <filter-ref name="server-header"/> <filter-ref name="x-powered-by-header"/> </host> </server> <servlet-container name="default"> <jsp-config/> <websockets/> </servlet-container> <handlers> <file name="web1-content" path="${jboss.home.dir}/simplecontext-web1"/> <file name="web2-content" path="${jboss.home.dir}/simplecontext-web2"/> <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/> </handlers> <filters> <response-header name="server-header" header-value="WildFly/10" header-name="Server"/> <response-header name="x-powered-by-header" header-value="Undertow/1" header-name="X-Powered-By"/> </filters> </subsystem>
, only requests exactly matching the alias land in the web application context, the rest of them goes straight to the WildFly welcome page, which is wrong:
Undertow | JBossWeb | |
---|---|---|
curl web1.rhel7GAx86-64:8080/ | ||
curl web1.rhel7Gax86-64:8080/ | ||
curl web1.rhel7gax86-64:8080/ | ||
curl web1:8080/ | ||
curl WEB1:8080/ |
Call to action
Could you evaluate this report and comment on whether the case sensitive matching is indeed intentional or not?
- clones
-
JBEAP-589 Unlike JBossWeb, Undertow treats virtual host aliases case-sensitively
- Closed
- relates to
-
MODCLUSTER-463 UpperCase Alias never matches any context
- Resolved