【问题标题】:Transfer-Encoding: Chunked causes 404 The system cannot find the file specifiedTransfer-Encoding: Chunked 导致 404 系统找不到指定的文件
【发布时间】:2013-09-26 01:22:40
【问题描述】:

我正在尝试发布到由 IIS6 提供的页面,并且我正在添加以下标题:

Transfer-Encoding: chunked

执行此操作时,我收到 404 错误:The system cannot find the file specified.。如果我对没有此标头的页面发出相同的请求,它肯定存在。

这是标头 - 两个请求之间的唯一区别是分块...

POST http://hostname/appname/index.html HTTP/1.1
Host: hostname
Connection: keep-alive
Transfer-Encoding: chunked
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
Content-Type: application/x-www-form-urlencoded
Referer: http://referrer/

还有身体:

4
xxxx
0

IIS 元数据库在 W3SVC 级别将 AspEnableChunkedEncoding 设置为 true,并且不会在站点级别覆盖它。

为什么会出现 404 错误?

更新:我注意到对不成功请求的响应:

x-powered-by: asp.net

...标题不存在。我不知道这是否有帮助 - 如果我没有在请求中设置标头,它就在那里。

【问题讨论】:

  • 您正在发布到 html 页面。你想达到什么目的?
  • .html 扩展名映射到 aspnet isapi dll - 所以它实际上是一个 aspx 页面。抱歉,我没有说清楚。
  • 是否安装了 URLScan?它可能会阻止标题?
  • 现在检查...常见问题解答解释说它会针对规则失败发出 404 响应:UrlScan v3.1 failures result in 404 errors and not 500 errors. Searching for 404 errors in your W3SVC log will include failures due to UrlScan blocking.

标签: asp.net iis iis-6 chunked-encoding chunked


【解决方案1】:

是否安装了 URLScan?它可能会阻止标题

【讨论】:

  • 是的 - 它配置了[DenyHeaders]\r\ntransfer-encoding:。麻烦给你100分!
猜你喜欢
  • 2018-09-12
  • 1970-01-01
  • 2021-08-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-11-21
相关资源
最近更新 更多