Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Running tileserver-php via Docker on Windows using a bind mount volume makes filemtime() return 0 #148

Open

Description

@jbaranski

If filemtime returns 0, the ETag hash is always the same and therefore every file attempted to serve 304's.

If filemtime is run on any file inside the container that's not part of the host mount volume (like /start.sh) it returns the correct value.

Any thoughts on the best way to resolve this? Here are a couple ideas:

  • Modify your code to check a flag and short circuit the isModified function if set, (HTTP_IF_MODIFIED_SINCE or HTTP_IF_NONE_MATCH could be set to SKIP or EXIT in .htaccess instead of an actual timestamp)
  • If lastModifiedTime in isModified is 0 don't set any headers, skip out and return false

If you have any other ideas I'd like to hear them, I would be happy to put together an MR based on what you want to do.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions