Description
Rick Mann opened SPR-10087 and commented
I'm not sure if the problem lies in the -test-mvc or -webmvc (or both).
In my webapp I build an HTTP response by calling HttpHeaders.add() twice with the same header and two different values. The resulting response on the wire contains this:
Vary: foo
Vary: bar
HTTP/1.1 allows this, but requires that it be possible to combine them into a single header field:
Vary: foo, bar
Unfortunately, the HeaderResultMatcher does not take the possibility of multiple headers into consideration when testing for the presence of a header:
Line 49 should call getHeaders() and iterate through all the available results.
Alternatively, if ResponseEntity and HttpHeaders collaborated to combine multiple headers with the same name onto a single line, then a containsString() test would be sufficient to work around this problem.
Affects: 3.2 RC2, 4.2.4
Referenced from: commits 952a317