通过HTTP获取文件创建日期 [英] Get File Creation Date Over HTTP
问题描述
给定web服务器上的一个文件(例如, http://foo.com/bar.zip - >只能通过HTTP访问),有没有办法获取日期属性(例如,date [创建,修改]),而不是首先下载整个存档?
Given a file on a webserver (e.g., http://foo.com/bar.zip -> only accessible through HTTP), is there any way to get the date attributes (e.g., date [created, modified]) without downloading the entire archive in the first place?
现在,我下载存档并以编程方式读取属性。麻烦的是,存档是数十个MiB,所以看起来像浪费资源下载整个事情,最后只读几个字节的信息。
Right now, I download the archive and read the attributes programmatically. Trouble is that the archive is dozens of MiB so it seems like a waste of resources to download the entire thing and end up reading off just a couple of bytes of information.
我意识到带宽几乎是免费的,但我不喜欢在任何情况下浪费。
I realize that bandwidth is practically free, but I don't like to be wasteful in any case.
推荐答案
尝试阅读<来自标题的href =http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.29 =noreferrer>上次修改
这篇关于通过HTTP获取文件创建日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!