WordPress.org

Make WordPress Core

Opened 16 months ago

Last modified 16 months ago

#23021 closed defect (bug)

Last-Modified header always set to 1970... when it is blank. Make browser cannot refresh cache. — at Version 1

Reported by: slene Owned by:
Milestone: 3.5.1 Priority: normal
Severity: normal Version: 3.5
Component: General Keywords: has-patch commit fixed-major
Focuses: Cc:

Description (last modified by SergeyBiryukov)

In #22258, the Last-Modified header set blank when user login.

A response with a blank Last-Modified header will be set to "Thu, 01 Jan 1970 00:00:00 GMT" in some server. The browser will be always send a If-Modified-Since header "Thu, 01 Jan 1970 00:00:00 GMT". and the server response a 304 status code. Make the browser can not refresh cache.

In php5.2 the Last-Modified header always blank. But php5.3 has header_remove remove it.
The Last-Modified header should be remove form $headers array when it blank.

sorry my bad english...

Change History (2)

comment:1 SergeyBiryukov16 months ago

  • Description modified (diff)
  • Keywords reporter-feedback removed

slene16 months ago

unset empty Last-Modified header before @header instead of use php5.3 function header_remove

Note: See TracTickets for help on using tickets.