Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System/System.Net/WebConnectionStream.cs')
-rw-r--r--mcs/class/System/System.Net/WebConnectionStream.cs15
1 files changed, 2 insertions, 13 deletions
diff --git a/mcs/class/System/System.Net/WebConnectionStream.cs b/mcs/class/System/System.Net/WebConnectionStream.cs
index c609455f32f..703f35d42b4 100644
--- a/mcs/class/System/System.Net/WebConnectionStream.cs
+++ b/mcs/class/System/System.Net/WebConnectionStream.cs
@@ -57,7 +57,6 @@ namespace System.Net
byte [] headers;
bool disposed;
bool headersSent;
- bool forceCompletion;
public WebConnectionStream (WebConnection cnc)
{
@@ -114,15 +113,9 @@ namespace System.Net
get { return (int) writeBuffer.Length; }
}
- internal void ForceCompletion ()
- {
- forceCompletion = true;
- }
-
internal void CheckComplete ()
{
- bool nrc = nextReadCalled;
- if (forceCompletion || (!nrc && readBufferSize - readBufferOffset == contentLength)) {
+ if (!nextReadCalled && readBufferSize - readBufferOffset == contentLength) {
nextReadCalled = true;
cnc.NextRead ();
}
@@ -158,12 +151,8 @@ namespace System.Net
} else {
new_size = contentLength - totalRead;
b = new byte [new_size];
- if (readBuffer != null && diff > 0) {
- if (diff > new_size)
- diff = new_size;
-
+ if (readBuffer != null && diff > 0)
Buffer.BlockCopy (readBuffer, readBufferOffset, b, 0, diff);
- }
int remaining = new_size - diff;
int r = -1;