Bug #1236


Last-Modified header suppressed in 1.4.15

Added by stepheneb over 14 years ago. Updated almost 10 years ago.

Target version:


After upgrading to lighttpd 1.4.15 I no longer get the Last-Modified header returned when making a HEAD request.

This is an example of what is returned from a HEAD request now:

HTTP/1.1 200 OK
Date: Fri, 15 Jun 2007 04:22:04 GMT
Server: lighttpd/1.4.15
Content-Type: application/octet-stream
Accept-Ranges: bytes
Content-Length: 1531
Connection: close
Actions #1

Updated by jan over 14 years ago

  • Status changed from New to Fixed
  • Resolution set to wontfix

this is a "feature". If there is no content-type set, we remove the Last-Modified header to protect the user from firefoxs caching. Otherwise FF will not detect the changed Content-Type.

Actions #2

Updated by Anonymous over 14 years ago

Do you have a reference that describes the "problem" with Firefox's caching?

I'd rather have the ability to enable or disable this behavior in the configuration file.

The resources I'm delivering in which the Last-Modified header is important never change their content-type -- specifically they are jars delivered as static files.

Actions #3

Updated by admin over 14 years ago

Otherwise FF will not detect the changed Content-Type.

Isn't that a server-side bug?
Are you allowed to change the content-type header without bumping the last modified header?

Actions #4

Updated by darix over 14 years ago

Yes this is a workaround for a bug in Firefox.
We have to often seen users bugged by firefox caching too much, and once they cleared the cache and restarted the browser, their changes suddenly "took effect".

Thats why we have in the #lighttpd topic: "Use curl for testing. Firefox caches too much."

Actions #5

Updated by Anonymous about 14 years ago

You wrote that Last-Modified is removed if no Content-Type is set, but I can see the Content-Type header in your posting as well as on my server responses.
We're having issues here with Squid not wanting to cache files if no Last-Modified or ETag header is present. What is the easiest way to get the get the Last-Modified header back for static files, without having to use an additional module like mod_setenv?

Actions #6

Updated by Anonymous almost 14 years ago

add this last in your mimetype.assign and you will generate Last-Modified again.

  1. make the default mime type application/octet-stream.
    "" => "application/octet-stream"
Actions #7

Updated by admin almost 14 years ago

make the default mime type

That's not a good thing to do. If the web server doesn't know, it shouldn't make one up.

Actions #8

Updated by stbuehler over 13 years ago

  • Status changed from Fixed to Wontfix
Actions #9

Updated by pabs almost 10 years ago

Is Firefox still buggy? It would be nice if this issue could finally be fixed.

Actions #10

Updated by darix almost 10 years ago

  • Description updated (diff)
  • Missing in 1.5.x set to No

there is no issue. configure proper mime types and you are fine.


Also available in: Atom