yangchongze00 / google-gdata

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

.NET resumable uploads not implemented correctly #431

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

Looking through the source code of resumableupload.cs (around line 540) it does 
not implement the Google protocol properly, especially the handling of "308 
continue" or the "Location" as described here:
http://code.google.com/apis/gdata/docs/resumable_upload.html

"308 continue" is not just an Ack, it needs to be parsed.

This means that it is buggy for large files and unreliable connections, which 
is the reason for using resumable uploads in the first place.

It also seems like the index calculation is incorrect.  The variable 
"chunkstart" is always = 0.  This means that it only ever works with small 
chunks that bypass this logic!  

With very small chunks, the .NET library buffers all the data before sending 
it.  The resumable uploader reaches 100% progress once this buffer is full, not 
once the data is all sent.  It then completes once the buffer is emptied.

This is probably one for Frank Mantek.

A fix would be appreciated.

Andrew

Original issue reported on code.google.com by andrew.f...@gmail.com on 7 Oct 2010 at 12:19