Case-sensitive HttpHeaders with ReadOnlyHttpHeaders
Spring Cloud recently upgraded to boot 3.4.0-M1 and I came across an interesting regression. Spring Cloud Gateway has various filters that work on http headers. After upgrading to framework 6.2.0-M6 I ran into a situation trying to get a "host" header using getFirst(HttpHeaders.HOST). The host header existed, but as lower case. The input value to HttpHeaders is a ReadOnlyHttpHeaders but it appears that it is not case-sensitive. I had to work around it by creating a new HttpHeaders object and add all the values from the original. Does this ring any bells?
I don't see anything that stands out in the commit history for 6.2. How would we reproduce this?
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
Sorry for the delay, I'll find the place in our build that was failing.
@rstoyanchev this is the commit to fix things and make them case sensitive again https://github.com/spring-cloud/spring-cloud-gateway/commit/b362a913037b7cbc40c40152a95dcc10abebc841
And this is the test that fails
https://github.com/spring-cloud/spring-cloud-gateway/blob/508ffeb51af720f3e12d4d87f22d7f360531085e/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/test/GatewayIntegrationTests.java#L115-L131
Specifically, this line fails https://github.com/spring-cloud/spring-cloud-gateway/commit/b362a913037b7cbc40c40152a95dcc10abebc841#diff-3b5acb6faa4abf622703749c7fe9fb7df8c98536e48a642ba7e9b3d2cc7a2a1dR114
Possibly https://github.com/spring-projects/spring-framework/commit/4b732d62c22297aea536a09477d2272c3e87a221. I'll work on an isolated minimal reproducer
I believe the fix for #33666 fixes this issue
This could be fixed by #33666.