The undertow servlet request handler is not processing Link headers correctly. When I try to read the Link header undertow gives me the value corresponding to a different header name.
The problem is that io.undertow.util.HeaderMap#getOrCreateEntry() hashes different header names into the same entry in its internal table. I have attached an example to demonstrate the issue, in it I send two headers with the names "Link" and "Rest". These strings just happen to hash to the same slot:
So calling request.getHeaders() (on an instance of io.undertow.servlet.spec.HttpServletRequestImpl) for header "Link" or "Rest" return the same value regardless of what the original headers were.
The problem was not pressent in wildfly commit https://github.com/wildfly/wildfly/commit/fcb5355be422c7a838b7d05264ea231bf4ab2579 and we first noticed it in https://github.com/wildfly/wildfly/commit/9a3b000767c018a681a4858a84aae20a0b8c7310
And the diff between the two is: https://github.com/wildfly/wildfly/compare/fcb5355be422c7a838b7d05264ea231bf4ab2579...9a3b000767c018a681a4858a84aae20a0b8c7310