在上传请求中从 IE8/9 浏览器收到奇怪的内容长度值

发布于 2024-11-25 16:40:07 字数 1116 浏览 2 评论 0原文

我面临着在计算机之间移动 4+GB 大小的文件的问题。首先,我无法移动微型 SD 卡上的文件 (请参阅我的其他帖子

所以现在我正在尝试上传此文件。确切的文件大小是 4549809009,因此当我尝试上传它时,我的上传因输入文件过早结束而失败。

以下是我得到的标题:

POST /webfolder/webapp/Folder/MediaChest HTTP/1.1
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://myotherhost/webfolder/webapp/Folder/MediaChest
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
Content-Type: multipart/form-data; boundary=---------------------------7db2ce294006e4
Accept-Encoding: gzip, deflate
Host: myotherhost
Content-Length: 254842353
Connection: Keep-Alive
Cache-Control: no-cache

那么为什么内容长度设置为 254842353? IE 在达到此大小后继续上传,但上传接收者认为已到达流末尾。问题出在哪里,在接收方还是发送方?

I am facing a problem of moving 4+GB size file between computers. First I couldn't move the file on micro SD card (see my other post)

So now I am trying to upload this file. Exact file size is 4549809009, so when I try to upload it, my upload fails at premature ending of a input file.

Here are headers I get:

POST /webfolder/webapp/Folder/MediaChest HTTP/1.1
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://myotherhost/webfolder/webapp/Folder/MediaChest
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
Content-Type: multipart/form-data; boundary=---------------------------7db2ce294006e4
Accept-Encoding: gzip, deflate
Host: myotherhost
Content-Length: 254842353
Connection: Keep-Alive
Cache-Control: no-cache

So why content length set as 254842353? IE continues uploading after reaching this size, however the upload receiver thinks that end of stream reached. Where is problem, in the receiver or the sender?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

记忆之渊 2024-12-02 16:40:07

我想问的一个问题是,另一个网站的托管是什么?如果它是由 IIS 托管的 Asp.Net 站点,您可能需要确保 web.config 中的 maxRequestLength 属性设置为处理那么大的 POST。

看:
增加iis6中的文件上传大小限制

One question I would have is, what is hosting the other site? If it is an Asp.Net site hosted by IIS, you will probably need to make sure that the maxRequestLength property in the web.config is set to handle a POST that big.

See:
Increase file upload size limit in iis6

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文