public Write ( byte buffer, int offset, int size ) : void | ||
buffer | byte | |
offset | int | |
size | int | |
return | void |
internal void SetWriteStream(WebConnectionStream stream) { if (aborted) { return; } writeStream = stream; if (bodyBuffer != null) { webHeaders.RemoveInternal("Transfer-Encoding"); contentLength = bodyBufferLength; writeStream.SendChunked = false; } SendRequestHeaders(); haveRequest = true; if (bodyBuffer != null) { // The body has been written and buffered. The request "user" // won't write it again, so we must do it. writeStream.Write(bodyBuffer, 0, bodyBufferLength); bodyBuffer = null; writeStream.Close(); } else if (method == "PUT" || method == "POST" || method == "OPTIONS") { if (getResponseCalled && !writeStream.RequestWritten) { writeStream.WriteRequest(); } } if (asyncWrite != null) { asyncWrite.SetCompleted(false, stream); asyncWrite.DoCallback(); asyncWrite = null; } }
internal void SetWriteStream (WebConnectionStream stream) { if (Aborted) return; writeStream = stream; if (bodyBuffer != null) { webHeaders.RemoveInternal ("Transfer-Encoding"); contentLength = bodyBufferLength; writeStream.SendChunked = false; } SendRequestHeaders (false); haveRequest = true; if (bodyBuffer != null) { // The body has been written and buffered. The request "user" // won't write it again, so we must do it. if (ntlm_auth_state != NtlmAuthState.Challenge) { writeStream.Write (bodyBuffer, 0, bodyBufferLength); bodyBuffer = null; writeStream.Close (); } } else if (method != "HEAD" && method != "GET" && method != "MKCOL" && method != "CONNECT" && method != "TRACE") { if (getResponseCalled && !writeStream.RequestWritten) writeStream.WriteRequest (); } if (asyncWrite != null) { asyncWrite.SetCompleted (false, stream); asyncWrite.DoCallback (); asyncWrite = null; } }
internal void SetWriteStream (WebConnectionStream stream) { if (Aborted) return; writeStream = stream; if (bodyBuffer != null) { webHeaders.RemoveInternal ("Transfer-Encoding"); contentLength = bodyBufferLength; writeStream.SendChunked = false; } SendRequestHeaders (false); haveRequest = true; if (bodyBuffer != null) { // The body has been written and buffered. The request "user" // won't write it again, so we must do it. if (ntlm_auth_state != NtlmAuthState.Challenge) { writeStream.Write (bodyBuffer, 0, bodyBufferLength); bodyBuffer = null; writeStream.Close (); } } else if (method != "HEAD" && method != "GET" && method != "MKCOL" && method != "CONNECT" && method != "TRACE") { if (getResponseCalled && !writeStream.RequestWritten) writeStream.WriteRequest (); } if (asyncWrite != null) { asyncWrite.SetCompleted (false, stream); asyncWrite.DoCallback (); asyncWrite = null; } }