Skip to content

MockHttpServletRequest does not handle rfc formatted dates. [SPR-12056] #16672

@spring-projects-issues

Description

@spring-projects-issues

Jakub Narloch opened SPR-12056 and commented

We have plug our REST client to work with the Spring MVC Test framework and we have noticied that sending the "IF-MODIFIED-SINCE" header breaks the server side code. The MockHttpServletRequest#getDateHeader should be blamed for that.

Apparently the implementation assumes that the date would be passed in memory as a java.lang.Date or optionally as numeric representation. Unfortnunetlly that is not the case when you try to test the code with production-ready client.

I think that the implementation should be consistent as much possible with the expected behaviour so I propose to add additional support for the valid date format representations as described in: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1


Issue Links:

Referenced from: pull request #614

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions