OneDrive / onedrive-sdk-ios

OneDrive SDK for iOS
https://dev.onedrive.com
Other
100 stars 87 forks source link

Download of file ranges does not work #129

Closed kreuli closed 8 years ago

kreuli commented 8 years ago

I want to download only parts of a file. For that I have created a subclass of ODRequestOptions to add the needed range to the download request header. So far so good. Problem is that the OneDrive server correctly returns HTTP status 206 for the successful partial download but ODURLSessionDownloadTask only accepts code 200 for success and does not return the downloaded content.

The fix is simple: just allow code 206 additionally to 200 in line 63 of UDURLSessionDownloadTask.

kevklam commented 8 years ago

Thanks, merged your fix.