Skip to content

Consider having HeaderWriters check before writing #6454

Closed
@jzheaux

Description

@jzheaux

Related to #5193

CacheControlHeaderWriter checks first before writing its corresponding headers.

Since HeaderWriterFilter writes headers at the end of a request, it makes sense that each HeaderWriter implementation would check whether its corresponding headers have already been written before overriding them.

That is, instead of doing:

response.setHeader(name, value)

do:

if (!response.hasHeader(name)) {
    response.setHeader(name, value);
}

Metadata

Metadata

Assignees

Labels

in: webAn issue in web modules (web, webmvc)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions