通过 ASHX 处理程序支持可恢复的 HTTP 下载? [英] Supporting resumable HTTP-downloads through an ASHX handler?

查看:21
本文介绍了通过 ASHX 处理程序支持可恢复的 HTTP 下载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们通过 ASP.NET 中的 ASHX 处理程序提供应用程序设置的下载.

We are providing downloads of our application setups through an ASHX handler in ASP.NET.

一位客户告诉我们他使用了一些第三方下载管理器应用程序,我们提供文件的方式目前不支持他的下载管理器应用程序的恢复"功能.

A customer told us he uses some third party download manager application and that our way of providing the files currently does not support the "resume" feature of his download manager application.

我的问题是:

恢复下载的基本思想是什么?是否有某个 HTTP GET 请求告诉我开始的偏移量?

What are the basic ideas behind resuming a download? Is there a certain HTTP GET request that tells me the offset to start at?

推荐答案

恢复下载通常通过 HTTP Range 标头工作.例如,如果客户端只需要文件的第二个 KB,它可能会发送标头 Range: bytes=1024-2048.

Resuming a download usually works through the HTTP Range header. For example, if a client wants only the second kilobyte of a file, it might send the header Range: bytes=1024-2048.

您可以查看 HTTP/1.1 的 RFC 的第 139 页了解更多信息.

You can see page 139 of the RFC for HTTP/1.1 for more information.

这篇关于通过 ASHX 处理程序支持可恢复的 HTTP 下载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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