Changeset 2306


Ignore:
Timestamp:
06/26/11 00:30:37 (3 years ago)
Author:
lowjoel
Message:

Merged revision(s) 2305 from branches/eraser6/6.0:
Supplant r2304 for future versions of Eraser were we may not want to buffer our output to include the content-length header.

Location:
trunk/eraser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser

  • trunk/eraser/Eraser/UpdateForm.cs

    r2300 r2306  
    538538            { 
    539539                Util.ProgressManager progress = new Util.ProgressManager(); 
    540                 progress.Total = response.ContentLength; 
     540                if (response.ContentLength == -1) 
     541                    progress.MarkIndeterminate(); 
     542                else 
     543                    progress.Total = response.ContentLength; 
    541544 
    542545                //Download the response 
     
    546549                { 
    547550                    memoryStream.Write(buffer, 0, lastRead); 
    548                     progress.Completed = memoryStream.Position; 
     551                    if (!progress.ProgressIndeterminate) 
     552                        progress.Completed = memoryStream.Position; 
     553                     
    549554                    if (handler != null) 
    550555                        handler(null, new Eraser.Util.ProgressChangedEventArgs(progress, 
Note: See TracChangeset for help on using the changeset viewer.