Do not add Accept-Ranges header on client-side
This commit fixes a regression that added the Accept-Ranges header on both client and server. Accept-Ranges is response header, so we now make sure it only appears on the server side. See gh-28291
This commit is contained in:
@@ -145,7 +145,10 @@ public class ResourceHttpMessageWriter implements HttpMessageWriter<Resource> {
|
||||
headers.setContentLength(length);
|
||||
}
|
||||
}
|
||||
headers.set(HttpHeaders.ACCEPT_RANGES, "bytes");
|
||||
if (message instanceof ServerHttpResponse) {
|
||||
// server side
|
||||
headers.set(HttpHeaders.ACCEPT_RANGES, "bytes");
|
||||
}
|
||||
}
|
||||
|
||||
private static MediaType getResourceMediaType(
|
||||
|
||||
Reference in New Issue
Block a user