@@ -480,7 +480,7 @@ public <T> T getTransient(String key) {
480
480
* @param value the header value
481
481
*/
482
482
public void addResponseHeader (final String key , final String value ) {
483
- updateResponseHeader (key , value , v -> v , false );
483
+ addResponseHeader (key , value , v -> v );
484
484
}
485
485
486
486
/**
@@ -490,7 +490,19 @@ public void addResponseHeader(final String key, final String value) {
490
490
* @param value the header value
491
491
*/
492
492
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 ));
494
506
}
495
507
496
508
/**
@@ -500,17 +512,9 @@ public void updateResponseHeader(final String key, final String value) {
500
512
* @param key the header name
501
513
* @param value the header value
502
514
* @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 ));
514
518
}
515
519
516
520
/**
0 commit comments