comparison Net/HTTP.cs @ 84:146a8d224d86

Added ArrayUtil.Remove, fixed some exceptons
author Ivo Smits <Ivo@UCIS.nl>
date Thu, 05 Jun 2014 00:21:02 +0200
parents 50d4aed66c67
children ebdff34b9e4f
comparison
equal deleted inserted replaced
83:4ca44dd25a6a 84:146a8d224d86
154 MemoryStream oldbuffer = Buffer; 154 MemoryStream oldbuffer = Buffer;
155 Buffer = null; 155 Buffer = null;
156 Context.SendHeader("Transfer-Encoding", "chunked"); 156 Context.SendHeader("Transfer-Encoding", "chunked");
157 OutputStream = Context.BeginResponseData(); 157 OutputStream = Context.BeginResponseData();
158 Mode = HTTPResponseStreamMode.Chunked; 158 Mode = HTTPResponseStreamMode.Chunked;
159 oldbuffer.WriteTo(this); 159 if (oldbuffer != null) oldbuffer.WriteTo(this);
160 } 160 }
161 161
162 public override void Write(byte[] buffer, int offset, int count) { 162 public override void Write(byte[] buffer, int offset, int count) {
163 if (offset < 0 || count < 0 || offset + count > buffer.Length) throw new ArgumentOutOfRangeException("buffer", "Offset and count arguments exceed the buffer dimensions"); 163 if (offset < 0 || count < 0 || offset + count > buffer.Length) throw new ArgumentOutOfRangeException("buffer", "Offset and count arguments exceed the buffer dimensions");
164 switch (Mode) { 164 switch (Mode) {