- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如何使用 HTTP 协议(protocol)获取可以从 HTTP 服务器下载的文件的时间戳?我对WinHttp functions特别感兴趣,但任何 HTTP 引用都可以。
响应头中有一个时间戳字段,但它指的是 HTTP 服务器响应的时间,而不是文件的文件时间。
最佳答案
要检索通过 HTTP 接收的文件的创建/修改日期时间,在 HTTP 响应 header 中存在一个字段 Last-Modified
。
正如文档所说:
The Last-Modified entity-header field indicates the date and time at which the origin server believes the variant was last modified [...] The exact meaning of this header field depends on the implementation of the origin server and the nature of the original resource. For files, it may be just the file system last-modified time
检索 header 信息的 WinHttp 函数是 WinHttpQueryHeaders .
关于c++ - 使用 WinHttp 函数检索 HTTP 文件的时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26925039/
This page on msdn包含可能在 WinHTTP 中使用的 HTTP 状态代码的定义。有没有办法从 WinHttp 中发出的请求中检索 HTTP 状态代码? 我发现获取响应文本的唯一方法是
我有一个 C++ 应用程序,它与我们的一台服务器建立 HTTPS 连接。在我的理想世界中,我希望发生以下情况: 应用启动 应用程序使 Windows 信任服务器的根 CA(无需 GUI,只需系统调用)
我目前正在尝试编写一个类来让我更轻松地发送简单的请求。 最后我希望它可以像这样使用: int _tmain(int argc, _TCHAR* argv[]) { HttpRequest Re
我在 Visual C++ 2015 中使用 Casablanka Rest SDK。Casablanka SDK 基于 winhttp。每当通过 SSL 发送请求时,都会收到异常。异常(except
我的 C++ 不是很好,如果您在代码片段中看到可以更好的地方,请教我! 我正在以异步方式实现 winhttp。但我无法检索响应。我想不通。因为您应该能够一次解析整个响应。由于可能会发生多个并发请求,因
我最近将一个完全可用的 WinInet 程序移植到 WinHTTP。这是我编写的一个函数,用于将整个 GET 请求包装到一行代码中: bool Get(Url url, std::vector& da
我需要从网站的大约 6000 页中提取数据。在做了一些研究之后,我决定试一试 WinHTTP。我能够让它工作,但是我正在同步做事,所以需要一段时间才能完成。我现在正尝试异步使用 WinHTTP,但遇到
我正在尝试使用 vba WinHttp.WinHttpRequest 向 kigo 的 api 发出请求, 我能够发送请求,但 WinHttpRequest 更改了内容类型添加 Charset=UTF
我在 Access 2007 VBA 中使用 WinHTTP 来获取一些需要 cookie 登录凭据帐户的项目列表。 首先我通过https://www.example.com/login.php登录有
编辑:线程:https://security.stackexchange.com/questions/179352/winhttp-prevent-successful-handshake-if-pe
我正在创建一个 Delphi 应用程序来从 Internet 下载文件,如果服务器支持范围请求,它将是多线程的。进度也会转发回 GUI。 当前的软件模型使用TThread组件。 GUI 调用 TDow
请告知Delphi XE中是否有WinHTTP包装器 按优先顺序排列: 开箱即用的 Delphi 单元 带有移植入口例程的第三方开源 pas 文件 xxx_TLB.pas 包装器 解决方案: 由于注释
我正在尝试从网页下载数据然后解析它,问题是我无法获取 pszoutbuffer 的值(ZeroMemory 函数将其删除)我采取了来自 MSDN 示例的代码 void http_connect::r
我正在尝试在 C++ 中使用 WinHTTP 执行 HTTP GET,但在解析名称后(在状态回调函数中获取 WINHTTP_CALLBACK_STATUS_NAME_RESOLVED 之后)它在某个时
我正在尝试使用 WinHTTP 连接到服务器,不幸的是,当我尝试将协议(protocol)从 http 升级到 webscoket 时,API WinHttpSetOption 失败。 hSessio
我正在开发一个客户端-服务器应用程序,其中服务器是一个基于 SSL 证书执行客户端验证的 Web 服务器。服务器信任根 CA 证书。 Client 是一个用 C++ 开发的 Windows 应用程序,
在花了几天的时间把我的头撞到墙上后,我想我应该在这里问一下。 下面代码的问题是我基本上是在迭代一个目录,将文件上传到那里。所有文件都很小,大小约为 1KB,因此这不是大小问题。第一次上传顺利通过,所有
在向服务器发帖之前我需要添加任何标题吗? 例如,目前我正在尝试以这种方式发送请求以及发布数据, LPCWSTR post = L"name=User&subject=Hi&message=Hi";
根据 MSDN , WinHttpSetCredentials 要求您指定确切的用户名和密码。 有没有办法使用当前用户凭据? 无需指定用户名和密码,即。 当我发送请求时,我收到一个 401 响应。 (
WinHttp.dll 是标准的 Windows 文件吗?我的应用程序依赖于它,但我宁愿不在我的应用程序设置中部署它,除非它是必要的。 最佳答案 根据:http://msdn.microsoft.co
我是一名优秀的程序员,十分优秀!