-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downloading files with content-encoding: gzip fails with HTTP2 #6885
Comments
Please make sure you enabled |
This happens if the downloaded file does not have the same size as the content-lenght header. This should not happen under normal condition, unless there is a bug in the server that does not give the full file, or a proxy or so cuts the connection. |
yesterday i enabled logging but it didn't provide informations ,that are useful . |
I see that you are using demo.owncloud.com, this server resets itself every now and then. Maybe it was reset while the file was downloading, causing the connection to close too early. My feeling is that the error was genuine. |
Hi there, I'm seeing this error as well, but only on Linux clients trying to use virtual files that are text/plain. The error does not happen on Mac clients accessing text/plain virtual files. Alas, the error message from the server isn't very helpful. The error only appears to happen with text files. |
It would be nice to have more detailed step to reproduce, or log available. |
|
@dialognewmedia-mws I couldn't reproduce the problem with the current latest client.
@lazawan You said you could reproduce and had logs - I'd like to see them even if they look non-useful. |
@ckamm unfortunately i perfrom my tests in vms ,which i often reset . |
@ckamm i tried to reproduce it again on the owncloud-client 2.5.2 ,but i didn't get it again |
@ckamm @michaelstingl sorry , i just managed to reproduce it on windows and these are the logs :
i have managed to reproduce it with following steps : |
@lazawan I'm still unable to reproduce with 2.5.2, having repeated 4-7 three times. Could you try again with a server that isn't demo.owncloud.org? Could you try again while capturing debug logs (--logdebug or, preferably, using the persistent log-writing feature)? That would show the amount of data the client received vs the client expected, potentially hinting at what's up. Feel free to just upload the entire log too, maybe something breaks in a previous sync that makes the final sync fail. |
@ckamm i managed to reproduce it with another server " demo.owncloud.com" |
I can't create the situation, but could just connect to demo.owncloud.com and use your file. This doesn't look related to virtual files: It seems the "Content-Length" header that's returned says 88 but the number of bytes in the reply is 90. Curiously, if I manually GET the file with curl, the content-length header is 90. I also printed the reply's rawHeaderPairs() in the propagation code, and there the content-length is definitely 88. @guruz Do you know of anything that could tamper with the header, or lead to it having a different value?
|
If I add "Accept-Encoding: gzip" to curl the content length will also be 88 and the returned compressed data is 88 bytes in length. |
Summary of discussion about this issue with @guruz: Qt transparently decompresses gziped responses. For http1 connections it will remove the content-length header when it does the decompression. It appears that for http2 connections it doesn't. That confuses the client because it thinks the content-length for the compressed data applies to the decompressed data. |
@ckamm Why not use the size() of the network reply? |
|
@guruz I think QNetworkReply::size() is the vanilla QIODevice::size() which returns bytesAvailable() for sequential devices. That's not what we want. |
It contains the compressed size. See https://bugreports.qt.io/browse/QTBUG-73364
It contains the compressed size. See https://bugreports.qt.io/browse/QTBUG-73364
@lazawan Please test this with tomorrows daily build |
@guruz ok will do it :-) |
@guruz i have just tested the testpilotcloud from daily-build on windows 10 ,also testpilotcloud-2.5.3.11410.11255-daily20190131.en-US.msi |
Fixed upstream too, I guess it will end up in 5.12.13 |
Virtualfile aborts during Downloading with Error message saying : " The file could not be downloaded completely "
the bug happened on Ubuntu 18.10 box
The text was updated successfully, but these errors were encountered: