Skip to content

Commit d66f7a4

Browse files
committed
FELIX-6782 Allow adding custom headers to Jetty error pages
- Use put instead of add to allow for replacing headers
1 parent 99f1107 commit d66f7a4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

http/jetty12/src/main/java/org/apache/felix/http/jetty/internal/JettyErrorHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public JettyErrorHandler(Map<String, String> customHeaders) {
3535
public boolean handle(Request request, Response response, Callback callback) throws Exception {
3636
if (!customHeaders.isEmpty()) {
3737
Mutable headers = response.getHeaders();
38-
customHeaders.forEach(headers::add);
38+
customHeaders.forEach(headers::put);
3939
}
4040

4141
return super.handle(request, response, callback);

0 commit comments

Comments
 (0)