Skip to content

Add a new ResultMatcher for date formats in HTTP headers [SPR-13263] #17854

@spring-projects-issues

Description

@spring-projects-issues

Brian Clozel opened SPR-13263 and commented

HTTP headers such as "Expires", "Last-Modified" all use date strings like "Tue, 21 Jul 2015 10:00:00 GMT".

A new ResultMatcher should be useful to test those date headers using a long timestamp:

this.mockMvc.perform(get("/persons/1").header("If-Modified-Since", now))
  .andExpect(status().isNotModified())
  .andExpect(header().dateValue("Last-Modified", timestamp));

Affects: 4.2 RC3

Issue Links:

Referenced from: commits cf2aed9

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions