arturobernalg opened a new pull request, #1151:
URL: https://github.com/apache/tomcat/pull/1151

   @markt-asf the Smoke Test jobs on main are failing since 5cbc3bafeb ("Allow 
for absolute host names in Mapper"). The new check for a trailing period reads 
`host.charAt(host.length() - 1)` without checking that the host name is not 
empty, so a request with an empty `Host` header field throws an 
`ArrayIndexOutOfBoundsException` (`Index -1 out of bounds for length 0` at 
`Mapper.java:753`) instead of being mapped to the default host.
   
   The fix checks that the host name is not empty before looking for the 
trailing period.
   
   `TestHttp11Processor` has five tests that cover this: 
`testInconsistentHostHeader04`, `05`, `06`, `testBlankHostHeader01` and `02`. 
They fail on main (5 failures out of 70) and pass with this change (70 of 70). 
I also ran the same test profile that the Smoke Test job uses (`ant 
-Dtest.profile=smoke deploy test-nio test-status`) locally on this branch and 
it completes successfully (54 test classes, no failures). `TestMapper` and 
`TestMapperWebapps` also pass.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to