System.Net.HttpWebRequest.HttpWebRequest.CheckSendError C# (CSharp) Method

CheckSendError() private method

private CheckSendError ( WebConnectionData data ) : void
data WebConnectionData
return void
		void CheckSendError (WebConnectionData data)
		{
			// Got here, but no one called GetResponse
			int status = data.StatusCode;
			if (status < 400 || status == 401 || status == 407)
				return;

			if (writeStream != null && asyncRead == null && !writeStream.CompleteRequestWritten) {
				// The request has not been completely sent and we got here!
				// We should probably just close and cause an error in any case,
				saved_exc = new WebException (data.StatusDescription, null, WebExceptionStatus.ProtocolError, webResponse); 
				webResponse.ReadAll ();
			}
		}