Bug ID 1122377: If-Modified-Since always returns 304 response if there is no last-modified header in the server response

Last Modified: Feb 07, 2024

Affected Product(s):
BIG-IP LTM(all modules)

Known Affected Versions:
15.1.4, 15.1.4.1, 15.1.5, 15.1.5.1, 15.1.6, 15.1.6.1, 15.1.7, 15.1.8, 15.1.8.1, 15.1.8.2

Fixed In:
17.1.0, 16.1.4, 15.1.9

Opened: Jun 28, 2022

Severity: 4-Minor

Symptoms

Requests sent with an If-Modified-Since header always return a 304 Not Modified response

Impact

When the Last Modified header is not present in the response, its default value i.e., Thu, 01 Jan 1970 00:00:00 GMT, is used and 304 Not Modified is sent to the client.

Conditions

The Last Modified header is not included in the origin server response headers.

Workaround

Add the Last-Modified header to the response headers using iRule when HTTP_RESPONSE priority 1 { set time [clock format [clock seconds] -gmt 1 -format "%a, %d %b %Y %H:%M:%S %Z"] HTTP::header insert Last-Modified $time log local0.debug "Inserting Last-Modified header as $time" }

Fix Information

Use date header value when Last-Modified is not present in Response headers

Behavior Change

Guides & references

K10134038: F5 Bug Tracker Filter Names and Tips