mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
When a download aborts prematurely, the status code is often 200 OK, even though we probably should not proceed with any further processing of the downloaded information. This silent failure leads to problems like the dreaded "Error: ENOENT: no such file or directory, open... os.json" (#7806 and others), which were hard to diagnose properly because the failure occurred only later, when extracting a buffer that downloaded incompletely. The getUrlWithResuming helper should be able to retry after this error is thrown, which will result in a more helpful warning, even if in the most common case, i.e. MaxCDN failure, it will never actually succeed. Note that this change will not help until Meteor 1.4.2 is officially released and becomes the implementation used to download later releases. Mitigates #7806.