如何强制apache以分块编码格式传送文件

sgo*_*owd 5 apache chunked-encoding

我正在验证我的应用程序是否处理通过分块编码模式传递的文件内容.我不确定对httpd.conf文件进行了哪些更改以通过Apache强制进行分块编码.是否可以使用Apache服务器执行此操作,如果不是更简单的解决方案?我正在使用Apache 2.4.2和HTTP 1.1.

默认情况下,在Apache中保持活动状态为On,在使用wireshark进行测试时,我看不到数据是分块的.

编辑:添加更多信息:

Hen*_*ory 1

该资源产生分块结果http://www.httpwatch.com/httpgallery/chunked/ ,这对于测试客户端非常有用。你可以通过运行看到这一点

$ curl --raw -i http://www.httpwatch.com/httpgallery/chunked/
HTTP/1.1 200 OK
Cache-Control: private,Public
Transfer-Encoding: chunked
Content-Type: text/html
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Mon, 22 Jul 2013 09:41:04 GMT

7b
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

2d
<html xmlns="http://www.w3.org/1999/xhtml">
....
Run Code Online (Sandbox Code Playgroud)

  • 对于测试很有用,但不能以任何方式回答问题。 (3认同)