Skip to content

Commit

Permalink
Allows NetworkStreamer to handle the situation where a server ignore …
Browse files Browse the repository at this point in the history
…Range-end paramenter of the http Range header and return more content than expected
  • Loading branch information
t83714 committed Sep 17, 2019
1 parent 94d7bf9 commit 1abb0de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions papaparse.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,6 @@ License: MIT

if (IS_WORKER && xhr.status === 0)
this._chunkError();
else
this._start += this._config.chunkSize;
};

this._chunkLoaded = function()
Expand All @@ -684,7 +682,10 @@ License: MIT
return;
}

this._finished = !this._config.chunkSize || this._start > getFileSize(xhr);
this._start += xhr.responseText.length;

this._finished = !this._config.chunkSize || this._start >= getFileSize(xhr);

this.parseChunk(xhr.responseText);
};

Expand Down

0 comments on commit 1abb0de

Please sign in to comment.