The attached patch seems to fix the problem. I've tested it lightly with a few different cases (with and without redirects) and didn't find any regressions.
The root cause seems to be that when reconnecting due to a redirect, zsync forgets to discard the data remaining in the buffer from the previous connection.
The attached patch seems to fix the problem. I've tested it lightly with a few different cases (with and without redirects) and didn't find any regressions.
The root cause seems to be that when reconnecting due to a redirect, zsync forgets to discard the data remaining in the buffer from the previous connection.