zhaocc1106 opened a new issue, #2436: URL: https://github.com/apache/brpc/issues/2436
**Describe the bug (描述bug)** https://github.com/apache/brpc/blob/master/example/http_c%2B%2B/http_server.cpp 启动上述example样例测试服务持续发送时,使用curl命令和chrome浏览器请求发现不是持续接收的,而是最后一起显示出来。 启动一个如下flask服务对比是没问题的: ``` from flask import Flask, Response import time app = Flask(__name__) @app.route('/stream') def stream(): def generate(): for i in range(10000): yield f"Number: {i}\n" # 每次生成一行数据并发送给客户端 time.sleep(0.01) return Response(generate(), mimetype='text/plain') # 返回一个流式响应 if __name__ == '__main__': app.run() ``` **To Reproduce (复现方法)** 1. 启动样例https://github.com/apache/brpc/blob/master/example/http_c%2B%2B/http_server.cpp 2. 使用curl命令访问:curl -v http://0.0.0.0:8010/FileService/largefile **Expected behavior (期望行为)** 持续接收到一部分内容并显示。 **Versions (各种版本)** OS: Ubuntu 18.04.5 LTS \n \l Compiler: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 brpc: 1.6.0 protobuf: libprotoc 3.9.2 **Additional context/screenshots (更多上下文/截图)** -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org