h2020-westlife-eu / virtualfolder

Virtual Folder
http://internal-wiki.west-life.eu/w/index.php?title=D6.1
MIT License
1 stars 0 forks source link

File picking from WEBDAV may be truncated #46

Closed TomasKulhanek closed 7 years ago

TomasKulhanek commented 7 years ago
https://portal.west-life.eu/webdav/eyJ1c2VybmFtZSI6ImEubS5qLmouYm9udmluQHV1Lm5sIn0:1dKiV5:t3n_v2DMF055v6mVV9pAS3K12Hk/b2drop/DISVIS-data/restraints.txt

The content of that file when downloading it is truncated:

# ADH crosslinks
A  27 CA B  18 CA 0 23
A 122 CA B 125 CA 0 23
A 122 CA B 128 CA 0 23
A 122 CA B 127 CA 0 23
A 16

While it should be (If I download it directly from B2DROP):

# ADH crosslinks
A  27 CA B  18 CA 0 23
A 122 CA B 125 CA 0 23
A 122 CA B 128 CA 0 23
A 122 CA B 127 CA 0 23
A 164 CA B  49 CA 0 23

# ZL crosslinks
A 55 CA B 169 CA 0 26
A 55 CA B 179 CA 0 26
A 54 CA B 179 CA 0 26
A 49 CA B 188 CA 0 26
TomasKulhanek commented 7 years ago

Reported by M.Trellet:

The “funny” part that it seems to work perfectly for the PDB files we 
are downloading via B2DROP and they are around 150KB but the 
faulty file is ~230B, just few lines of text. 
Using the public URL given by filepicker (via B2DROP) has also kind
 of an erratic behaviour, I can download a file one time but then for
 all the other files I get the 503 error I evoked in my previous email.
TomasKulhanek commented 7 years ago

1) Reproduced issue with HTTP 503 on testing VM. The mod_proxy redirects the request via secured authenticated channel to b2drop while on the other hand it returns HTTP 503. Will investigate...

2) Reproduced the truncated txt file while getting small.txt file 150 kB on public portal the https://portal.west-life.eu/webdav/eyJ1c2VybmFtZSI6InRvbWFzLmt1bGhhbmVrQHN0ZmMuYWMudWsifQ:1dKmpb:9hq4lpsh4ueWPbAr6dkq3mA2Hfc/pcloud_tomas/Westlife/small.txt

Not reproduced on private testing VM, small file is returned OK.

TomasKulhanek commented 7 years ago

HTTP 503 issue moved to issue #47

Benzene commented 7 years ago

Should be fixed. The issue was that the webdav proxy that does the authentication used the Content-Length returned by B2DROP, but this content-length was the length of the gzipped data, not the content-length of the full content.

So it returned the un-gzipped content with the content-length of the gzipped content in the headers, which caused the truncate.