Closed Nek- closed 2 years ago
According to RFC: https://greenbytes.de/tech/webdav/rfc7540.html#rfc.section.8.1.p.4
HTTP/2 uses DATA frames to carry message payloads. The chunked transfer encoding defined in Section 4.1 of [RFC7230] MUST NOT be used in HTTP/2.
The error message is updated to be more clear.
@doubaokun does this means there's a way to stream responses with HTTP/2 and Swoole that is different? Didn't find anything in the documentation.
@doubaokun are you saying SSE is not compatible with HTTP/2 ?
@Nek- it will be supported at the next release, PR https://github.com/openswoole/swoole-src/pull/125
Hello! Thanks for your work on swoole. I just tried it to make what I would hope a powerfull http/2 sse server but it didn't work at all. The reason is that it seems to be impossible to stream responses with swoole. Too bad!
I tried to stream a response by using the method
Response::write()
.Response streamed to user. No warning from swoole.
php --ri openswoole
)?4.7.2
uname -a
&php -v
&gcc -v
) ?https://github.com/openswoole/swoole-src/blob/8a581f572e6869e28bdf308d5640643ea6846172/ext-src/swoole_http_response.cc#L240-L245