Skip to content

Commit fdb54fa

Browse files
committed
Efficiency improvements for #5977
Improve efficiency for non wrapped response for cache-contro
1 parent c0b0f80 commit fdb54fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jetty-server/src/main/java/org/eclipse/jetty/server/ResourceService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,10 +836,10 @@ protected void putHeaders(HttpServletResponse response, HttpContent content, lon
836836
r.putHeaders(content, contentLength, _etags);
837837
HttpFields fields = r.getHttpFields();
838838
if (_acceptRanges && !fields.contains(HttpHeader.ACCEPT_RANGES))
839-
fields.put(ACCEPT_RANGES);
839+
fields.add(ACCEPT_RANGES);
840840

841841
if (_cacheControl != null && !fields.contains(HttpHeader.CACHE_CONTROL))
842-
fields.put(_cacheControl);
842+
fields.add(_cacheControl);
843843
}
844844
else
845845
{

0 commit comments

Comments
 (0)