博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How to make PHP generate Chunked response
阅读量:6872 次
发布时间:2019-06-26

本文共 1249 字,大约阅读时间需要 4 分钟。

hot3.png

This has gotten a little vauge... if you don't mind big assed chunks, (0x1000 octets or so), then yes, PHP will make them.

PHP will generated the numbered sections, etc.

If you want to send tiny little chunks, as you might do with an AJAX client... well, I've combined the OPs question, with some research on PHP.NET, and it does look like he was on to a good thing.

$ echo -en "GET /chunked/ HTTP/1.1\r\nHost: ec\r\n\r\n" | nc localhost 80

HTTP/1.1 200 OKDate: Wed, 23 May 2012 13:03:01 GMTServer: Apache/2.2.9 (Debian) PHP/5.3.5-1 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8oX-Powered-By: PHP/5.3.5-1Transfer-encoding: chunkedContent-Type: text/html14Teachers have class.50We secure our friends not by accepting favors but by doing them.            -- Thucydides48Vulcans never bluff.            -- Spock, "The Doomsday Machine", stardate 4202.131All kings is mostly rapscallions.            -- Mark Twain41Reappraisal, n.:    An abrupt change of mind after being found out.49He who knows, does not speak.  He who speaks, does not know.            -- Lao Tsu

Whether or not it will eventually squeeze out it out's own (incorrect) chunk count, remains to be seen... but I saw no sign of it.

转载于:https://my.oschina.net/huangsz/blog/186669

你可能感兴趣的文章
IAR spi调试
查看>>
我的友情链接
查看>>
linux下dhcp服务器搭建
查看>>
python list列表、tuple元祖
查看>>
我的友情链接
查看>>
Java关键字break和continue
查看>>
qtcreator的中文输入
查看>>
(1)DHCP的安装与授权 (2)地址、排除地址的建立 (3)选项的设置
查看>>
线程同步基础 -- synchronized篇
查看>>
quantum-f3的namespace的一些错误解决
查看>>
Centos 5.4 安装vncserver
查看>>
设计模式-Observer Pattern
查看>>
Esx4.0开机报错(vsd-mount失败)
查看>>
Lync 小技巧-52-Lync 2013-不加域-客户端-2-导入-证书-信任链
查看>>
nodejs简易聊天室
查看>>
RedHat AS4上安装yum与gcc详细教程
查看>>
lightning mdb 源代码分析(5)-事务控制
查看>>
war后缀的文件
查看>>
struts2-知识点:开发模式,源码查看
查看>>
tar 报错gzip: stdin: not in gzip format
查看>>