void OnAsyncResponseStopped (IntPtr sender, IntPtr calldata, IntPtr closure)
{
try {
if (progress != null) {
BrowserHttpWebResponse response = async_result.Response as BrowserHttpWebResponse;
// report the 100% progress on compressed (or without Content-Length)
if (response.IsCompressed) {
long length = response.ContentLength;
progress (length, length);
}
}
}
finally {
async_result.SetComplete ();
}
}