moxiecode/moxie — pull request #49 by skalooza (2013-09-16 20:43:09+00:00)
Title: A couple Silverlight runtime fixes/changes. Mainly to allow larger uploads

I wrote about these changes in issue #48, but I'll try to sum them up. I was getting an error when trying to chunk upload any file because the methodInfo.Invoke call for the Blob.destroy() method was getting called with an argument. Blob.destroy doesn't have any arguments so reflection was unable to find the correct method to execute. Adding an object argument to the method fixed that error.

The other changes in Blob.cs are to allow _slice to work on larger files. An error would be thrown when trying to start a slice > Int32 max.

The change in XMLHttpRequest.cs came from when I was debugging and I noticed an exception being thrown every time a chunk was upload, yet things still worked. When using the BrowserHTTP client in Silverlight, response.Headers is not allowed so it threw a caught exception every request. The response.SupportsHeaders addition prevents these exceptions from being thrown.