System.Net.Browser.BrowserHttpWebRequest.CheckProtocolViolation C# (CSharp) Méthode

CheckProtocolViolation() protected méthode

protected CheckProtocolViolation ( ) : void
Résultat void
		protected override void CheckProtocolViolation ()
		{
			if (String.Compare (Method, "GET", StringComparison.OrdinalIgnoreCase) != 0)
				return;

			if (Headers.ContainsKey ("Cache-Control"))
				throw new NotSupportedException ();

			// most headers are checked when set, but some are checked much later
			foreach (string header in bad_get_headers) {
				// case insensitive check to internal Headers dictionary
				if (Headers.ContainsKey (header))
					throw new ProtocolViolationException ();
			}
		}
	}