WinGridProxy utility (minor)

- Correct handling of responses with a 'Zero' length

Original commit by Greythane (WhiteCoreSim)
This commit is contained in:
Fly Man
2015-07-03 21:56:41 +02:00
parent 6da12edb38
commit e24da24edf

View File

@@ -1,4 +1,4 @@
/*
/*
* Copyright (c) 2006-2014, openmetaverse.org
* All rights reserved.
*
@@ -624,7 +624,11 @@ namespace WinGridProxy
this.Host = uri;
this.Name = capsKey;
this.ContentType = responseHeaders.Get("Content-Type");
this.Length = Int32.Parse(responseHeaders.Get("Content-Length"));
var ContentLength = responseHeaders.Get("Content-Length");
if (ContentLength != null)
this.Length = Int32.Parse (ContentLength);
else
this.Length = 0;
}
public override string ToPrettyString(Direction direction)