fix containsHeader test when it is not instance of Response, Issue #5977 was partially fixed

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
This commit is contained in:
olivier lamy 2021-02-23 10:01:53 +10:00
parent ea2a76ed3b
commit 38ef4009b9
1 changed files with 2 additions and 2 deletions

View File

@ -838,10 +838,10 @@ public class ResourceService
else else
{ {
Response.putHeaders(response, content, contentLength, _etags); Response.putHeaders(response, content, contentLength, _etags);
if (_acceptRanges && !response.containsHeader(HttpHeader.ACCEPT_RANGES.name())) if (_acceptRanges && !response.containsHeader(HttpHeader.ACCEPT_RANGES.asString()))
response.setHeader(ACCEPT_RANGES.getName(), ACCEPT_RANGES.getValue()); response.setHeader(ACCEPT_RANGES.getName(), ACCEPT_RANGES.getValue());
if (_cacheControl != null && !response.containsHeader(HttpHeader.CACHE_CONTROL.name())) if (_cacheControl != null && !response.containsHeader(HttpHeader.CACHE_CONTROL.asString()))
response.setHeader(_cacheControl.getName(), _cacheControl.getValue()); response.setHeader(_cacheControl.getName(), _cacheControl.getValue());
} }
} }