-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
download works and md5 is fine, but we got these:
I see a message the |
these are the headers copied over from the data provider:
no trace of status code. if I comment out the last |
there seems to be a hint there but logging the headers that were copied did not show any content-length there, so not sure where that error comes from |
nothing there...
the md5sum in the reva data folder matches the one from the downloaded file and also the source from which it was uploaded. weird... |
seems it's rather happening in ocdav, I was looking at the data gateway. here in ocdav:
the content-length value matches what's on-disk... |
the matching curl also returns the correct content-length:
and the file's md5 matches |
when downloading with curl there are no errors in the code. with Firefox or Chromium, I guess the browsers are closing the connection as soon as they have enough bytes. I'll compare this with earlier ocis versions and hope it's not a regression |
in ocis-beta8 the error does not appear for downloading:
I'll bisect reva to see if it's a regression there. |
with ocis-beta8 and the latest reva before ocfs fix, sitting on commit 75664dd downloading still works fine, no errors in log. this is before presigned urls |
ok, so reva seems to work fine on the latest code of reva and ocis-reva owncloud/ocis-reva#420 so this confirms that there is no regression in reva and the problem is likely triggered somehow by the code path of pre-signed URLs. |
looking at the error again:
the log entries appear in that order:
it's not yet clear which one is influencing which |
so I added logging for the
|
So this means the trigger is happening in io.Copy from the data provider. I'm wondering if an absence content-length qualifies as zero... but why would that only be relevant now with presigned URL and not before ? |
another set here:
it seems the But I don't understand how the download can still go through... At first I suspected that maybe this is due to the HEAD call that is done by Phoenix, but the HEAD call alone doesn't produce anything. And doing a GET with curl on the URL also doesn't trigger anything. So maybe it's something extra that the browsers do when downloading ? |
I've checked the trace for the HEAD request and it doesn't contain any error. |
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@PVince81 the browser is sending a GET request like this:
This request uses the old webdav endpoint and will be forwarded to the ocdav handler in reva. That in turn will lookup the responsible storage provider and issue the actual GET request. Maybe something is not copying the streams correctly there. Might not be a browser issue...
|
from all the tests I did today, these are the locally saved files by Chromium:
and the original one:
so that interruption is not relevant to the download. So is Chromium downloading the bytes from the ether ?? |
that error is not caused by chrome ... it is logged by the ocdav get handler in https://github.com/cs3org/reva/blob/b946f40f6a020cea81175127b0871654d53a0e28/internal/http/services/owncloud/ocdav/get.go#L144 |
correction: I actually see two sets of call to OCDAV, but both seem to report coming from a "GET", but no mention of "HEAD" in the log. |
with small files we only get the I had a look at Wireshark but the packets all seemed fine. |
commenting out "res.Close" in all involved layers did not help, like advised in https://forum.golangbridge.org/t/code-works-fine-but-i-get-error-in-io-copy-write-tcp-write-connection-reset-by-peer/3370/5 |
Some of the log lines are created by the proxy: openshift/origin#23651 |
also: the log lines are reproducable for larger files with normal curl: curl https://localhost:9200/remote.php/webdav/youcandrawcomicbookcharacters.pdf -u einstein:relativity -k this file is ~67MB ... and produces
|
since downloading works anyway, let's move the debugging to another ticket: https://github.com/owncloud/ocis-proxy/issues/86 |
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Complexity increasing per file
==============================
- pkg/middleware/account_uuid.go 1
See the complete overview on Codacy |
Fixes owncloud/ocis#436