Skip to content

Commit

Permalink
fix containsHeader test when it is not instance of Response, Issue #5977
Browse files Browse the repository at this point in the history
 was partially fixed

Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
  • Loading branch information
olamy committed Feb 23, 2021
1 parent ea2a76e commit 38ef400
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -838,10 +838,10 @@ protected void putHeaders(HttpServletResponse response, HttpContent content, lon
else
{
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());

if (_cacheControl != null && !response.containsHeader(HttpHeader.CACHE_CONTROL.name()))
if (_cacheControl != null && !response.containsHeader(HttpHeader.CACHE_CONTROL.asString()))
response.setHeader(_cacheControl.getName(), _cacheControl.getValue());
}
}
Expand Down

0 comments on commit 38ef400

Please sign in to comment.