You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When request content in chunks, PapaParse may trigger HTTP 416 (Range Not Satisfiable) Error under the following two situation:
we always calculate end as: var end = this._start + this._config.chunkSize - 1; see here. This likely always make the last chunk request to request a range that is beyond the actual file size (unless the actual last chunk size is just equal to the this._config.chunkSize.) Many servers will response HTTP 416 error for this.
Solution: use Content-Range header to retrieve the actual file size and use actual content size - 1 as the end for the last chunk
As we often don't know the actual size of the target file before we request it, it's possible the this._config.chunkSize is configured to a size that is larger than the file size. e.g. the file is only 100 bytes and this._config.chunkSize is configured to 64KB. When this happens, PapaParse will always fail on the first chunk request due to HTTP 416 (Range Not Satisfiable) Error
Solution: we should retry (only once) on the first chunk request without Range header on 416 error
The text was updated successfully, but these errors were encountered:
When request content in chunks, PapaParse may trigger HTTP 416 (Range Not Satisfiable) Error under the following two situation:
end
as:var end = this._start + this._config.chunkSize - 1;
see here. This likely always makethe last chunk
request to request a range that is beyond the actual file size (unless the actual last chunk size is just equal to thethis._config.chunkSize
.) Many servers will responseHTTP 416
error for this.Content-Range
header to retrieve the actual file size and useactual content size - 1
as theend
for the last chunkthis._config.chunkSize
is configured to a size that is larger than the file size. e.g. the file is only 100 bytes and this._config.chunkSize is configured to 64KB. When this happens, PapaParse will always fail on the first chunk request due to HTTP 416 (Range Not Satisfiable) ErrorThe text was updated successfully, but these errors were encountered: