Changeset 1486
- Timestamp:
- 1/8/2010 2:47:40 AM (3 years ago)
- File:
-
- 1 edited
-
branches/eraser6/6.0/Eraser/UpdateForm.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/6.0/Eraser/UpdateForm.cs
r1360 r1486 33 33 using Eraser.Util; 34 34 using System.Net.Cache; 35 using System.Net.Mime; 35 36 using System.Globalization; 36 37 … … 686 687 using (WebResponse resp = req.GetResponse()) 687 688 { 688 byte[] tempBuffer = new byte[16384]; 689 //Check for a suggested filename. 690 ContentDisposition contentDisposition = null; 691 foreach (string header in resp.Headers.AllKeys) 692 if (header.ToLowerInvariant() == "content-disposition") 693 contentDisposition = new ContentDisposition(resp.Headers[header]); 694 689 695 string tempFilePath = Path.Combine( 690 696 tempDir.FullName, string.Format(CultureInfo.InvariantCulture, "{0}-{1}", 691 ++currUpdate, Path.GetFileName(reqUri.GetComponents(UriComponents.Path, 692 UriFormat.Unescaped)))); 693 697 ++currUpdate, 698 contentDisposition == null ? 699 Path.GetFileName(reqUri.GetComponents(UriComponents.Path, 700 UriFormat.Unescaped)) : contentDisposition.FileName)); 701 702 byte[] tempBuffer = new byte[16384]; 694 703 using (Stream strm = resp.GetResponseStream()) 695 704 using (FileStream tempStrm = new FileStream(tempFilePath, FileMode.CreateNew))
Note: See TracChangeset
for help on using the changeset viewer.
