@@ -480,7 +480,7 @@ public <T> T getTransient(String key) {
480480 * @param value the header value
481481 */
482482 public void addResponseHeader (final String key , final String value ) {
483- updateResponseHeader (key , value , v -> v , false );
483+ addResponseHeader (key , value , v -> v );
484484 }
485485
486486 /**
@@ -490,7 +490,19 @@ public void addResponseHeader(final String key, final String value) {
490490 * @param value the header value
491491 */
492492 public void updateResponseHeader (final String key , final String value ) {
493- updateResponseHeader (key , value , v -> v , true );
493+ updateResponseHeader (key , value , v -> v );
494+ }
495+
496+ /**
497+ * Add the {@code value} for the specified {@code key} with the specified {@code uniqueValue} used for de-duplication. Any duplicate
498+ * {@code value} after applying {@code uniqueValue} is ignored.
499+ *
500+ * @param key the header name
501+ * @param value the header value
502+ * @param uniqueValue the function that produces de-duplication values
503+ */
504+ public void addResponseHeader (final String key , final String value , final Function <String , String > uniqueValue ) {
505+ threadLocal .set (threadLocal .get ().putResponse (key , value , uniqueValue , maxWarningHeaderCount , maxWarningHeaderSize , false ));
494506 }
495507
496508 /**
@@ -500,17 +512,9 @@ public void updateResponseHeader(final String key, final String value) {
500512 * @param key the header name
501513 * @param value the header value
502514 * @param uniqueValue the function that produces de-duplication values
503- * @param replaceExistingKey whether to replace the existing header if it already exists
504- */
505- public void updateResponseHeader (
506- final String key ,
507- final String value ,
508- final Function <String , String > uniqueValue ,
509- final boolean replaceExistingKey
510- ) {
511- threadLocal .set (
512- threadLocal .get ().putResponse (key , value , uniqueValue , maxWarningHeaderCount , maxWarningHeaderSize , replaceExistingKey )
513- );
515+ */
516+ public void updateResponseHeader (final String key , final String value , final Function <String , String > uniqueValue ) {
517+ threadLocal .set (threadLocal .get ().putResponse (key , value , uniqueValue , maxWarningHeaderCount , maxWarningHeaderSize , true ));
514518 }
515519
516520 /**
0 commit comments