asp.net - 使用 wget 下载分块资源?

标签 asp.net curl wget chunked-encoding

有一个使用此 Controller 的示例 ASP.NET 项目:

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
   protected void Page_Load(object sender, EventArgs e)
   {
       Response.Write("test1234");
       Response.Clear();
       Response.Flush();
       Response.Write("test5");
       Response.End();
   }
}

在浏览器(Chrome 10)中我看到“test5”并且 传输编码:分块

当尝试使用 wget 下载(来自最新的 Cygwin)时,我得到了

$ wget -S  --read-timeout=60 http://127.0.0.1/EmptyWebSite/test/
--2011-04-05 23:25:51--  http://127.0.0.1/EmptyWebSite/test/
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Server: Microsoft-IIS/5.1
  Date: Tue, 05 Apr 2011 20:25:51 GMT
  X-Powered-By: ASP.NET
  X-AspNet-Version: 2.0.50727
  Cache-Control: private
  Content-Type: text/html
Length: unspecified [text/html]
Saving to: `index.html'

[ <=>  ] 0           --.-K/s   in 0s

文件(显然)是空的

出了什么问题?我可以使用 wget/curl 下载这样的资源吗?

最佳答案

Wget 从 1.13 版本开始支持 HTTP/1.1 和分块传输

关于asp.net - 使用 wget 下载分块资源?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5558151/

相关文章:

jquery - 从 jQuery 到 Sharepoint 的页面方法调用

php - 下载 xml 时 curl 超时

curl - 屏幕抓取

php - Cloudflare 不会通过 CURL 请求缓存页面

php - 使用 WGET 运行 cronjob PHP

jquery - 用样式化图标替换 ImageButton

c# - 禁用 CheckboxList 中的特定项目

ruby - 如何在 ruby​​ 中快速下载大量网页?并行下载?

c# - webclient 方法不适用于我的 Silverlight 应用程序

php - 保存动态 PHP 页面以供离线查看