I've been debugging a networking problem in https://github.com/owncloud/client/issues/7020#issuecomment-465578496 and I think the issue is in Qt's HTTP2 stack.
The symptom is QNetworkReply emitting finished() with NoError even though the request hasn't properly finished. A warning like 'stream 15 finished with error: ""' is seen.
Analysis (from mitmproxy talking to the server, so not entirely reliable, but shows what's going on):
- Client opens HTTP2 connection
- Requests data on streams 1, 3, 5, 7, 9
- Stream 1, 9 finish; Stream 3, 5, 7 are still streaming DATA frames and are not finished
- There's a GOAWAY 2^31-1 no-error frame from the server
- mitmproxy closes the connection with a tls close_notify
- there are more DATA frames from the server on streams 3, 7 that aren't ACKed by the client
- finally a GOAWAY 9 no-error frame, and the server's close_notify
If I read qhttp2protocolhandler.cpp correctly the problem is that the GOAWAY with a lastStreamID of 2^31-1 causes Qt to terminate all running streams. Specifically:
The GOAWAY spec says that the streams should not be closed at this point.