# http 服务中静态文件的 Last-Modified 是根据什么生成的
Issue
欢迎在 Gtihub Issue 中回答此问题: Issue 117 (opens new window)
Author
一般会选文件的 mtime
,表示文件内容的修改时间
nginx
也是这样处理的,源码见: ngx_http_static_module.c (opens new window)
r->headers_out.status = NGX_HTTP_OK;
r->headers_out.content_length_n = of.size;
r->headers_out.last_modified_time = of.mtime;
关于为什么使用 mtime
而非 ctime
,可以参考 #116 (opens new window)