Open plavjanik opened 2 years ago
I've been able to reproduce this issue when downloading binary data sets or USS files thru z/OSMF.
The issue is not specific to Zowe CLI as cURL also truncates the end of the file. It only happens when the "Accept-Encoding: gzip" header is passed and the REST response is compressed.
We plan to file an issue with z/OSMF about this, and in the interim to disable gzip compression in Zowe CLI for binary downloads.
Thank you for working on a workaround and reporting it to IBM.
Would not it be possible to activate the workaround based on the z/OSMF version in case that only some versions have this issue?
Sorry for not posting an update on this issue in so long. We have an ongoing case open with the z/OSMF team about this, and they are looking into it.
We have reproduced the issue with the following steps:
dd if=/dev/urandom of=testfile bs=1024 count=4
zowe files upload ftds testfile <dsname> --binary
curl -H "X-IBM-Data-Type: binary" "<zosmfUrl>/zosmf/restfiles/ds/<dsname>"
--compressed
optionI've added a "Blocked" label for now. Once the issue with z/OSMF is resolved, we can reenable gzip compression in Zowe CLI for binary downloads which should allow us to close this issue.
Would not it be possible to activate the workaround based on the z/OSMF version in case that only some versions have this issue?
I don't believe this is a version-specific bug. Gzip compression support is a fairly recent addition to z/OSMF so I think this bug is present in all versions of z/OSMF that support gzip compression.
Thank you for creating a bug report. If you haven't already, please ensure you have provided steps to reproduce it and as much context as possible.
I am downloading a binary file using the following command:
The download seems to be successful:
But the file is corrupted. It has been created using
jar
tool:But it cannot be opened using
jar
norunzip
on my computer.When I have used
zftp
plugin to download it, I am getting a different size of the file:and the FTP transferred file is ok.
They seem to differ only at the end:![image](https://user-images.githubusercontent.com/7644758/137901081-427a33ed-3ba5-4dcd-bdd0-63e03d127af9.png)