From 341b98fe4e8b31e3f9ed64ebc156291def9ccdb5 Mon Sep 17 00:00:00 2001 From: Hanwiz Date: Wed, 24 Aug 2016 11:11:39 -0500 Subject: [PATCH] No Content-Range, then finish with current data! --- papaparse.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/papaparse.js b/papaparse.js index 4dd12bb..a84162c 100644 --- a/papaparse.js +++ b/papaparse.js @@ -594,6 +594,9 @@ function getFileSize(xhr) { var contentRange = xhr.getResponseHeader('Content-Range'); + if (contentRange === null) { // no content range, then finish! + return -1; + } return parseInt(contentRange.substr(contentRange.lastIndexOf('/') + 1)); } }