Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xljiulang committed Jan 2, 2016
1 parent 040e007 commit 1c38909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Net40/NetworkSocket/Http/Result/FileResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public void ExecuteResult(HttpResponse response)

using (var stream = new FileStream(this.FileName, FileMode.Open, FileAccess.Read))
{
const int size = 8 * 1024;
var bytes = new byte[size];
const int size = 8 * 1024;
var state = response.WriteHeader((int)stream.Length);

while (state == true)
{
var bytes = new byte[size];
var length = stream.Read(bytes, 0, size);
if (length == 0)
{
Expand Down

0 comments on commit 1c38909

Please sign in to comment.