Skip to content

Support matching against multiple header values in HeaderAssertions #23878

Closed
@Adamovskiy

Description

@Adamovskiy

The only way to validate multiple response header values – is to assert for strict equality with valueEquals(String headerName, String... values). Got to be a way to also validate them against regular expression, and with any custom check, like in value(String name, Consumer<String> consumer) (which btw has wrong copy-pasted javadoc).

Other method javadocs say that they work with "primary value". There is no such term neither in RFC7230, nor in RFC6265. It seems that all values should be treated as equally significant.

This functionality is extremely important for work with response cookies (Set-Cookie header).

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions