Bug #1236

Last-Modified header suppressed in 1.4.15

Added by stepheneb over 7 years ago. Updated over 2 years ago.

Status:WontfixStart date:
Priority:UrgentDue date:
Assignee:-% Done:

0%

Category:core
Target version:1.4.16
Missing in 1.5.x:No

Description

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

History

#1 Updated by jan over 7 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.

#2 Updated by Anonymous over 7 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.

#3 Updated by admin over 7 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?

#4 Updated by darix over 7 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."

#5 Updated by Anonymous almost 7 years ago

Hi,
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?

#6 Updated by Anonymous over 6 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"

#7 Updated by admin over 6 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.

#8 Updated by stbuehler about 6 years ago

  • Status changed from Fixed to Wontfix

#9 Updated by pabs over 2 years ago

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

#10 Updated by darix over 2 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