Skip to content

Commit

Permalink
Fixed FileSizeError
Browse files Browse the repository at this point in the history
Fixed memory leak error in file size that was reading whole network file to check file size.
  • Loading branch information
gregyjames committed Feb 5, 2023
1 parent 1ef24de commit aa9e4d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OctaneEngine/Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private static string prettySize(long len)
{
using (var client = new HttpClient())
{
var response = await client.GetAsync(url);
var response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead);
var responseLength = response.Content.Headers.ContentLength ?? 0;
var rangeSupported = response.Headers.AcceptRanges.Contains("bytes");

Expand Down
2 changes: 1 addition & 1 deletion OctaneEngine/OctaneEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<NeutralLanguage>en-US</NeutralLanguage>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>OctaneEngineCore</PackageId>
<PackageVersion>4.1.0</PackageVersion>
<PackageVersion>4.2.0</PackageVersion>
<Authors>Greg James</Authors>
<Description>A high Performance C# file downloader that asyncrounously downloads files as pieces. Made as a faster, more efficent replacement to Microsoft's WebClient.</Description>
<Copyright>2015, Greg James</Copyright>
Expand Down

0 comments on commit aa9e4d0

Please sign in to comment.