gauravtyagi2777 / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

ResumableUploader does not properly resume #677

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. An error 503 during a ResumableUploader followed by a .ResumeAsync

What is the expected output? What do you see instead?
Always get an error 400 after a .ResumeAsync to resume after an error 503.

What version of the product are you using? On what operating system?
Google Data API SDK 2.2.0.0 on Windows 8.1 with .NET Framework 4.0

Please provide any additional information below.
I looked at 
http://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/src/core/re
sumableupload.cs.

In CopyData, the line of code 
     lastChunks[requestId] = chunkEnd;
is executed before any of the data is sent to the server. I think it should be 
at the end of CopyData. 

Because the restart point is saved in lastChunks before the data is copied, the 
subsequent .ResumeAsync will attempt to resume with the next chunk instead of 
the last chunk. 

Original issue reported on code.google.com by MikeMe...@gmail.com on 31 Dec 2013 at 2:47