Comments (5)
问题修复了,原因是这两个例子中的超时时间设成0导致的,改成10就OK了。超时值为0在之前旧版本acl里表示无限等待,后来的含义变成不等待,所以这两个例子中的超时值为0是不对的。
from acl.
应该是你没有设置响应的数据长度导致的,可以在调用 res.write(body) 前调用: res.setContentLength(body.size()) ,有两种方式:
方式一:
res.setChunkedTransferEncoding(true);
return res.write(body) && res.write(NULL, 0);
方式二:
res.setContentLength(body.size());
return res.write(body);
from acl.
额。还真是这样。眼拙了,我还在write那个地方调了很久,也没发现有什么问题😂,谢谢作者大神。
from acl.
现在访问http是ok了。还有一个问题想问问大神。
我使用/acl/lib_fiber/samples/https_client这个例子访问https,出现这个报错,就是读消息头报错了。
openssl_conf.cpp(366), openssl_dll_load: /usr/local/lib/libcrypto.so, /usr/local/lib/libssl.so loaded!
OpenSSL loaded, crypto=/usr/local/lib/libcrypto.so, ssl=/usr/local/lib/libssl.socall fiber_schedule
http_request.cpp(410), request: read response header error
我又跟踪了好一会,最后发现。如果我在读消息头(http_request.cpp的第405行之前)之前,断点1-2秒,就会正常读出https返回的消息。如果直接跑过去,就会报上面的错误。断点位置在bool http_request::request(const void* data, size_t len)里面,如图。
linux和macOS下都有这个问题。麻烦有空帮忙看看😂🌹
from acl.
好的,谢谢帅气的大神。
from acl.
Related Issues (20)
- MYSQL
- MYSQL冲突 HOT 3
- wizard模版中setup.sh文件获取Linux x86_64等类型的处理 HOT 1
- xmake 无法编译通过 HOT 1
- How to resolve compilation errors HOT 1
- TLS连接redis返回握手失败 HOT 5
- make buid_one error HOT 1
- httpserver如何绑定path处理类? HOT 2
- make
- make编译报错 找不到acl——
- 安装报错
- 安装报错 HOT 9
- acl::log::msg4与soci::logger::msg4冲突 HOT 3
- sourceforge上的包5年没更新啦 HOT 1
- 向导工具生成http服务项目 windows编译运行正常 linux下链接错误 HOT 6
- linux环境下run_alone调试运行有问题 HOT 3
- fiber消息队列的惊群问题 HOT 6
- acl_fiber_signum issue HOT 1
- Some doubts HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acl.