通过 HTTP 获取文件创建日期 [英] Get File Creation Date Over HTTP

查看:16
本文介绍了通过 HTTP 获取文件创建日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定一个网络服务器上的文件(例如,http://foo.com/bar.zip-> 只能通过 HTTP 访问),有没有办法在不首先下载整个存档的情况下获取日期属性(例如,日期 [创建、修改])?

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.

推荐答案

尝试阅读Last-Modified 来自标题

这篇关于通过 HTTP 获取文件创建日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆