首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
swoole\Http\Response->end()
我使用 {{{ Swoole\Http\Swoole->end($content); }}} wget, ab这些工具能正常收到返回,但是如果使用: > {{{ Swoole\Http\Swoole->write($content); Swoole\Http\Swoole->end(); }}} 浏览器可以正常识别断开,但是wget ,ab 之类的工具一直卡那里,查看wget收到的文件,可以看到最后是有\0返回的。 > {{{ [root@localhost workspace]# cat lusc 201 {"time":1463275679.5689,"class":"apps\\controllers\\TestController::actionLusc","server":{"REQUEST_METHOD":"GET","REQUEST_URI":"/test/lusc","PATH_INFO":"/test/lusc","REQUEST_TIME":"1463275679","REQUEST_TIME_FLOAT":"1463275679.5659","SERVER_PORT":"9501","REMOTE_PORT":"55916","REMOTE_ADDR":"127.0.0.1","SERVER_PROTOCOL":"HTTP/1.0","SERVER_SOFTWARE":"swoole-http-server","HTTP_USER_AGENT":"Wget/1.12 (linux-gnu)","HTTP_ACCEPT":"*/*","HTTP_HOST":"127.0.0.1:9501","HTTP_CONNECTION":"Keep-Alive"},"redis":"1463275679"} 0 [root@localhost workspace]# }}}
发布于7年前 · 1 次浏览 · 来自
提问
W
Wilfredmet
我使用 {{{ Swoole\Http\Swoole->end($content); }}} wget, ab这些工具能正常收到返回,但是如果使用: > {{{ Swoole\Http\Swoole->write($content); Swoole\Http\Swoole->end(); }}} 浏览器可以正常识别断开,但是wget ,ab 之类的工具一直卡那里,查看wget收到的文件,可以看到最后是有\0返回的。 > {{{ [root@localhost workspace]# cat lusc 201 {"time":1463275679.5689,"class":"apps\\controllers\\TestController::actionLusc","server":{"REQUEST_METHOD":"GET","REQUEST_URI":"/test/lusc","PATH_INFO":"/test/lusc","REQUEST_TIME":"1463275679","REQUEST_TIME_FLOAT":"1463275679.5659","SERVER_PORT":"9501","REMOTE_PORT":"55916","REMOTE_ADDR":"127.0.0.1","SERVER_PROTOCOL":"HTTP/1.0","SERVER_SOFTWARE":"swoole-http-server","HTTP_USER_AGENT":"Wget/1.12 (linux-gnu)","HTTP_ACCEPT":"*/*","HTTP_HOST":"127.0.0.1:9501","HTTP_CONNECTION":"Keep-Alive"},"redis":"1463275679"} 0 [root@localhost workspace]# }}}
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2017-10-15
h
happy1952
ab, wget 这些工具可能不支持Chunk
赞
0
回复
微信公众号
热门内容
作者其它话题
- swoole_process must run at php_cli environment
暂无回复的问答
- CodeGalaxy K3s 轻量集群节点之间如何实现负载均衡
- 关于openssl CURL WARNING swSSL_connect: SSL_connect(fd=69) failed. Error: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small[1|394]
- 多个模型如何进行事务异常回退?
- websocket开启wss报错
- 协程tcp服务器如何使用多进程?recv()方法接收信息,打印出来的pid一直是同一个。没用使用到多进程啊。