Imported Upstream version 3.8.0

Former-commit-id: 6a76a29bd07d86e57c6c8da45c65ed5447d38a61
This commit is contained in:
Jo Shields
2014-09-04 09:07:35 +01:00
parent a575963da9
commit fe777c5c82
1062 changed files with 12460 additions and 5983 deletions

View File

@@ -39,6 +39,7 @@ namespace System.Net
{
enum State {
None,
PartialSize,
Body,
BodyFinished,
Trailer
@@ -139,9 +140,9 @@ namespace System.Net
void InternalWrite (byte [] buffer, ref int offset, int size)
{
if (state == State.None) {
if (state == State.None || state == State.PartialSize) {
state = GetChunkSize (buffer, ref offset, size);
if (state == State.None)
if (state == State.PartialSize)
return;
saved.Length = 0;
@@ -262,7 +263,7 @@ namespace System.Net
ThrowProtocolViolation ("Cannot parse chunk size.");
}
return State.None;
return State.PartialSize;
}
chunkRead = 0;