Handle end_marker correctly before unzipping responses
flagoworld opened this issue · comments
Ryan commented
When the "end_marker" parameter is specified, the server appends the following characters to the very end of the download:
"EOF\n"
This exists to absolutely verify that the download finished correctly at the business logic level, as certain network conditions and network library implementations can cause the streamed download to prematurely fail in a way that the download library thinks it's successful.
You should check for this string and retry the download if it does not exist, and then strip it off the end before deflating the zip. In some scenarios this can cause certain unzip libraries to throw errors.