Closed
Description
Affects: 6.x+
It seems that if we provide multiple values for CONTENT_LANGUAGE
as an array like:
ResponseEntity.ok()
.header(HttpHeaders.CONTENT_LANGUAGE, contentLanguage.toArray(new String[0]))
.body(body);
It won't work nicely with MockHttpServletResponse
.
The logic we have there in setSpecialHeader
method:
expects that all the values are sent in a value
.
but from debugging, I saw that ServletServerHttpResponse
will call setSpecialHeader
of MockHttpServletResponse
for each header's value.
Thus, only the last value will be present in the response.