58 writes to
Binding.Http.IntegrationTests (2)
BasicHttpBindingTests.4.0.0.cs (2)
262httpReqMsgProp.Headers[userAgentHeaderName] = userAgent; 306httpReqMsgProp.Headers[userAgentHeaderName] = userAgent;
Client.ClientBase.IntegrationTests (3)
ClientBaseTestHelpers.cs (1)
105httpRequestMessage.Headers["customer"] = "my value";
MessageInspectorTestHelpers.cs (2)
120property.Headers["authType"] = _authenticationType; 126property.Headers["authType"] = _authenticationType;
dotnet-svcutil-lib (7)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (2)
208headers[WebSocketTransportSettings.SoapContentTypeHeader] = _channelFactory.WebSocketSoapContentType; 211headers[WebSocketTransportSettings.BinaryEncoderTransferModeHeader] = _channelFactory.TransferMode.ToString();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageExtensionMethods.cs (1)
117webHeaders[header.Key] = String.Join(",", header.Value);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (2)
231_headers[headerKey] = _originalHeaders[headerKey]; 365copiedProperty.Headers[headerKey] = this.Headers[headerKey];
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageProperty.cs (2)
256_headers[headerKey] = _originalHeaders[headerKey]; 389copiedProperty.Headers[headerKey] = this.Headers[headerKey];
Security.TransportSecurity.IntegrationTests (10)
Http\ClientCredentialTypeTests.4.1.0.cs (6)
56requestMessageProperty.Headers[DigestUsernameHeaderName] = username; 57requestMessageProperty.Headers[DigestPasswordHeaderName] = password; 58requestMessageProperty.Headers[DigestRealmHeaderName] = realm; 117requestMessageProperty.Headers[DigestUsernameHeaderName] = username; 118requestMessageProperty.Headers[DigestPasswordHeaderName] = password; 119requestMessageProperty.Headers[DigestRealmHeaderName] = realm;
Https\ClientCredentialTypeTests.4.1.0.cs (4)
71requestMessageProperty.Headers[BasicUsernameHeaderName] = username; 72requestMessageProperty.Headers[BasicPasswordHeaderName] = password; 146requestMessageProperty.Headers[BasicUsernameHeaderName] = username; 147requestMessageProperty.Headers[BasicPasswordHeaderName] = password;
System.Configuration.ConfigurationManager (3)
System\Configuration\NameValueSectionHandler.cs (1)
58result[key] = value;
System\Configuration\ProtectedConfigurationSection.cs (1)
71foreach (string key in pars) cloneParams[key] = pars[key];
System\Configuration\ProviderSettings.cs (1)
184Parameters[name] = value;
System.Net.HttpListener (1)
System\Net\Managed\ListenerAsyncResult.Managed.cs (1)
151context.Response.Headers["WWW-Authenticate"] = context.AuthenticationSchemes + " realm=\"" + context._listener!.Realm + "\"";
System.Net.Mail (13)
System\Net\Mail\MailPriority.cs (7)
389Headers[MailHeaderInfo.GetString(MailHeaderID.MimeVersion)] = "1.0"; 444Headers[MailHeaderInfo.GetString(MailHeaderID.XPriority)] = "1"; 445Headers[MailHeaderInfo.GetString(MailHeaderID.Priority)] = "urgent"; 446Headers[MailHeaderInfo.GetString(MailHeaderID.Importance)] = "high"; 450Headers[MailHeaderInfo.GetString(MailHeaderID.XPriority)] = "5"; 451Headers[MailHeaderInfo.GetString(MailHeaderID.Priority)] = "non-urgent"; 452Headers[MailHeaderInfo.GetString(MailHeaderID.Importance)] = "low";
System\Net\Mime\MimeBasePart.cs (2)
128Headers[MailHeaderInfo.GetString(MailHeaderID.ContentID)] = value; 144Headers[MailHeaderInfo.GetString(MailHeaderID.ContentLocation)] = value;
System\Net\Mime\MimePart.cs (4)
83Headers[MailHeaderInfo.GetString(MailHeaderID.ContentTransferEncoding)] = "base64"; 87Headers[MailHeaderInfo.GetString(MailHeaderID.ContentTransferEncoding)] = "quoted-printable"; 91Headers[MailHeaderInfo.GetString(MailHeaderID.ContentTransferEncoding)] = "7bit"; 95Headers[MailHeaderInfo.GetString(MailHeaderID.ContentTransferEncoding)] = "8bit";
System.Net.Requests (11)
System\Net\FileWebRequest.cs (1)
75set { _headers["Content-Type"] = value; }
System\Net\FileWebResponse.cs (2)
39_headers[HttpKnownHeaderNames.ContentLength] = _contentLength.ToString(NumberFormatInfo.InvariantInfo); 40_headers[HttpKnownHeaderNames.ContentType] = DefaultFileContentType;
System\Net\HttpWebRequest.cs (6)
220_webHeaderCollection[HeaderName] = value; 486_webHeaderCollection[HttpKnownHeaderNames.TransferEncoding] = checkedValue; 620_webHeaderCollection[HttpKnownHeaderNames.Connection] = checkedValue; 669_webHeaderCollection[HttpKnownHeaderNames.Expect] = checkedValue; 918newWebHeaders[headerName] = webHeaders[headerName]; 1554_webHeaderCollection[HttpKnownHeaderNames.Range] = curRange;
System\Net\HttpWebResponse.cs (2)
205_webHeaderCollection[header.Key] = GetHeaderValueAsString(header.Value); 212_webHeaderCollection[header.Key] = GetHeaderValueAsString(header.Value);
System.Net.WebClient (3)
System\Net\WebClient.cs (3)
503headers[HttpKnownHeaderNames.ContentType] = UploadFileContentType + "; boundary=" + boundary; 532headers[HttpKnownHeaderNames.ContentType] = contentType; 600headers[HttpKnownHeaderNames.ContentType] = UploadValuesContentType;
System.Net.WebHeaderCollection (2)
System\Net\WebHeaderCollection.cs (2)
83this[header.GetName()] = value; 103this[header.GetName()] = value;
System.ServiceModel.Http.Tests (1)
Channels\HttpRequestMessagePropertyTest.cs (1)
35original.Headers[testKeyName] = "testValue";
VBCSCompiler.UnitTests (2)
BuildServerControllerTests.cs (2)
34_appSettings[BuildServerController.KeepAliveSettingName] = "42"; 41_appSettings[BuildServerController.KeepAliveSettingName] = "dog";
123 references to
Aspire.Dashboard.Components.Tests (4)
Pages\MetricsTests.cs (4)
116Assert.Equal("test-meter", query["meter"]); 117Assert.Equal("test-instrument", query["instrument"]); 118Assert.Equal("720", query["duration"]); 119Assert.Equal(MetricViewKind.Table.ToString(), query["view"]);
Aspire.Dashboard.Tests (2)
Integration\FrontendBrowserTokenAuthTests.cs (2)
209Assert.NotNull(queryString["t"]); 239Assert.NotNull(queryString["t"]);
dotnet-svcutil-lib (9)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrClientWebSocketFactory.cs (1)
30webSocket.Options.SetRequestHeader(header, headers[header]);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
1059string value = requestHeaders[name];
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageExtensionMethods.cs (2)
93contentHeaders.TryAddWithoutValidation(headerKey, headersToMerge[headerKey]); 97mainHeaders.TryAddWithoutValidation(headerKey, headersToMerge[headerKey]);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpRequestMessageProperty.cs (2)
231_headers[headerKey] = _originalHeaders[headerKey]; 365copiedProperty.Headers[headerKey] = this.Headers[headerKey];
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageProperty.cs (2)
256_headers[headerKey] = _originalHeaders[headerKey]; 389copiedProperty.Headers[headerKey] = this.Headers[headerKey];
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageContent.cs (1)
61string value = requestHeaders[name];
Microsoft.AspNetCore.Authentication.Test (1)
OpenIdConnect\OpenIdConnectChallengeTests.cs (1)
992PushedParameters[key] = query[key];
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (12)
ResponseHeaderTests.cs (12)
58Assert.Null(response.Headers["Transfer-Encoding"]); 60Assert.NotNull(response.Headers["Date"]); 61Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]); 62Assert.Equal("custom1", response.Headers["WWW-Authenticate"]); 83Assert.Null(response.Headers["Transfer-Encoding"]); 85Assert.NotNull(response.Headers["Date"]); 86Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]); 87Assert.Equal("custom1, and custom2, custom3", response.Headers["WWW-Authenticate"]); 108Assert.Null(response.Headers["Transfer-Encoding"]); 110Assert.NotNull(response.Headers["Date"]); 111Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]); 112Assert.Equal("custom1, and custom2, custom3", response.Headers["Custom-Header1"]);
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Extensions\SourceGeneratedDocumentUri.cs (2)
69var assemblyPath = query[AssemblyPathParam]; 87var value = nameValueCollection[keyName];
Microsoft.Maui (1)
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
178 var invokeDataString = invokeQueryString["data"];
Microsoft.ML.Core (1)
Utilities\ResourceManagerUtils.cs (1)
325if (webResponse.StatusCode == HttpStatusCode.Redirect && webResponse.Headers["Location"] == "https://www.microsoft.com/?ref=aka")
PresentationCore (4)
MS\Internal\AppModel\CookieHandler.cs (1)
81string p3pHeader = httpResponse.Headers["P3P"];
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (1)
751String contentRange = responseHeaders[ContentRangeHeader];
System\Windows\CoreCompatibilityPreferences.cs (2)
126string s = appSettings["IncludeAllInkInBoundingBox"]; 166string s = appSettings["EnableMultiMonitorDisplayClipping"];
PresentationFramework (8)
MS\Win32\UxThemeWrapper.cs (1)
284string s = appSettings["ThemeNameOverride"];
System\Windows\FrameworkCompatibilityPreferences.cs (7)
213string s = appSettings["UseSetWindowPosForTopmostWindows"]; 263string s = appSettings["IsVirtualizingStackPanel_45Compatible"]; 296_scrollingTraceTarget = appSettings["ScrollingTraceTarget"]; 314_scrollingTraceFile = appSettings["ScrollingTraceFile"]; 396string s = appSettings[nameof(ShouldThrowOnCopyOrCutFailure)]; 431_IMECompositionTraceTarget = appSettings["IMECompositionTraceTarget"]; 449_IMECompositionTraceFile = appSettings["IMECompositionTraceFile"];
System.Configuration.ConfigurationManager (6)
System\Configuration\AppSettingsReader.cs (1)
42string val = _map[key];
System\Configuration\DpapiProtectedConfigurationProvider.cs (2)
97_keyEntropy = configurationValues["keyEntropy"]; 125string s = configurationValues[valueName];
System\Configuration\ProtectedConfigurationSection.cs (1)
71foreach (string key in pars) cloneParams[key] = pars[key];
System\Configuration\Provider\ProviderBase.cs (1)
36_description = config["description"];
System\Configuration\ProviderSettings.cs (1)
133string valueInCollection = _propertyNameCollection[key];
System.Net.HttpListener (32)
System\Net\HttpListenerRequest.cs (13)
24public string[]? AcceptTypes => Helpers.ParseMultivalueHeader(Headers[HttpKnownHeaderNames.Accept]!); 26public string[]? UserLanguages => Helpers.ParseMultivalueHeader(Headers[HttpKnownHeaderNames.AcceptLanguage]!); 58string? cookieString = Headers[HttpKnownHeaderNames.Cookie]; 76string? postDataCharset = Headers["x-up-devcap-post-charset"]; 109public string? ContentType => Headers[HttpKnownHeaderNames.ContentType]; 123if (string.IsNullOrEmpty(Headers[HttpKnownHeaderNames.Connection]) || string.IsNullOrEmpty(Headers[HttpKnownHeaderNames.Upgrade])) 160string? header = Headers[HttpKnownHeaderNames.ProxyConnection]; 163header = Headers[HttpKnownHeaderNames.Connection]; 173header = Headers[HttpKnownHeaderNames.KeepAlive]; 205public string? UserAgent => Headers[HttpKnownHeaderNames.UserAgent]; 209public string UserHostName => Headers[HttpKnownHeaderNames.Host]!; 215string? referrer = Headers[HttpKnownHeaderNames.Referer];
System\Net\HttpListenerResponse.cs (4)
29_webHeaders.Add(headerName, value[headerName]); 38get => Headers[HttpKnownHeaderNames.ContentType]; 195if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"Entering Set-Cookie: {Headers[HttpResponseHeader.SetCookie]}, Set-Cookie2: {Headers[HttpKnownHeaderNames.SetCookie2]}"); 239if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"Exiting Set-Cookie: {Headers[HttpResponseHeader.SetCookie]} Set-Cookie2: {Headers[HttpKnownHeaderNames.SetCookie2]}");
System\Net\Managed\HttpConnection.cs (1)
517force = (_context.Response.Headers[HttpKnownHeaderNames.Connection] == HttpHeaderStrings.Close);
System\Net\Managed\HttpListenerContext.Managed.cs (1)
38string? header = Request.Headers[HttpKnownHeaderNames.Authorization];
System\Net\Managed\HttpListenerRequest.Managed.cs (3)
181string? t_encoding = Headers[HttpKnownHeaderNames.TransferEncoding]; 201if (string.Equals(Headers[HttpKnownHeaderNames.Expect], "100-continue", StringComparison.OrdinalIgnoreCase)) 242if (Headers[HttpKnownHeaderNames.TransferEncoding] != null)
System\Net\Managed\HttpListenerResponse.Managed.cs (2)
166if (_webHeaders[HttpKnownHeaderNames.Server] == null) 171if (_webHeaders[HttpKnownHeaderNames.Date] == null)
System\Net\Managed\ListenerAsyncResult.Managed.cs (1)
141string? authHeader = context.Request.Headers["Authorization"];
System\Net\Managed\WebSockets\HttpWebSocket.Managed.cs (4)
24string? secWebSocketVersion = request.Headers[HttpKnownHeaderNames.SecWebSocketVersion]; 27string? origin = request.Headers[HttpKnownHeaderNames.Origin]; 33request.Headers[HttpKnownHeaderNames.SecWebSocketProtocol], 44string? secWebSocketKey = request.Headers[HttpKnownHeaderNames.SecWebSocketKey];
System\Net\WebSockets\HttpWebSocket.cs (3)
114context.Request.Headers[HttpKnownHeaderNames.Upgrade])); 117string? secWebSocketVersion = context.Request.Headers[HttpKnownHeaderNames.SecWebSocketVersion]; 135string? secWebSocketKey = context.Request.Headers[HttpKnownHeaderNames.SecWebSocketKey];
System.Net.Mail (4)
System\Net\Mime\MimeBasePart.cs (2)
119get { return Headers[MailHeaderInfo.GetString(MailHeaderID.ContentID)!]; } 135get { return Headers[MailHeaderInfo.GetString(MailHeaderID.ContentLocation)!]; }
System\Net\Mime\MimePart.cs (1)
56string value = Headers[MailHeaderInfo.GetString(MailHeaderID.ContentTransferEncoding)!]!;
System\Net\Mime\MimeWriter.cs (1)
33WriteHeader(key, headers[key]!, allowUnicode);
System.Net.Requests (18)
System\Net\FileWebRequest.cs (1)
74get { return _headers["Content-Type"]; }
System\Net\HttpWebRequest.cs (13)
228return _webHeaderCollection[HttpKnownHeaderNames.Accept]; 279return _webHeaderCollection[HttpKnownHeaderNames.ContentType]; 329long.TryParse(_webHeaderCollection[HttpKnownHeaderNames.ContentLength], out value); 355return _webHeaderCollection[HttpKnownHeaderNames.UserAgent]; 426return _webHeaderCollection[HttpKnownHeaderNames.Referer]; 448return _webHeaderCollection[HttpKnownHeaderNames.TransferEncoding]; 589return _webHeaderCollection[HttpKnownHeaderNames.Connection]; 639return _webHeaderCollection[HttpKnownHeaderNames.Expect]; 918newWebHeaders[headerName] = webHeaders[headerName]; 1201_sendRequestMessage.Content.Headers.TryAddWithoutValidation(headerName, _webHeaderCollection[headerName!]); 1205_sendRequestMessage.Headers.TryAddWithoutValidation(headerName, _webHeaderCollection[headerName!]); 1535string? curRange = _webHeaderCollection[HttpKnownHeaderNames.Range]; 1602string? headerValue = _webHeaderCollection[headerName];
System\Net\HttpWebResponse.cs (4)
146string? lastmodHeaderValue = Headers["Last-Modified"]; 173string? server = Headers["Server"]; 267string? contentType = Headers["Content-Type"]; 358string? headerValue = Headers[headerName];
System.Net.WebClient (10)
System\Net\WebClient.cs (10)
481string? contentType = headers[HttpKnownHeaderNames.ContentType]; 594string? contentType = headers[HttpKnownHeaderNames.ContentType]; 609values.Append(UrlEncode(data[name])); 724string? accept = _headers[HttpKnownHeaderNames.Accept]; 725string? connection = _headers[HttpKnownHeaderNames.Connection]; 726string? contentType = _headers[HttpKnownHeaderNames.ContentType]; 727string? expect = _headers[HttpKnownHeaderNames.Expect]; 728string? referrer = _headers[HttpKnownHeaderNames.Referer]; 729string? userAgent = _headers[HttpKnownHeaderNames.UserAgent]; 730string? host = _headers[HttpKnownHeaderNames.Host];
System.Net.WebHeaderCollection (2)
System\Net\WebHeaderCollection.cs (2)
75return this[header.GetName()]; 95return this[header.GetName()];
System.Net.WebSockets.Client (1)
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
104request.Headers.TryAddWithoutValidation(key, options.RequestHeaders[key]);
System.Runtime.Caching (3)
System\Runtime\Caching\Configuration\ConfigUtil.cs (3)
23string sValue = config[valueName]; 56string sValue = config[valueName]; 81string sValue = config[valueName];
System.ServiceModel.Http.Tests (2)
Channels\HttpRequestMessagePropertyTest.cs (2)
45Assert.Equal(original.Headers[testKeyName], copy.Headers[testKeyName]);
VBCSCompiler (1)
src\Compilers\Server\VBCSCompiler\BuildServerController.cs (1)
64if (int.TryParse(_appSettings[KeepAliveSettingName], NumberStyles.Integer, CultureInfo.InvariantCulture, out int keepAliveValue) &&