29 references to Value
InMemory.FunctionalTests (5)
Http2\Http2TestBase.cs (1)
195_receivedRequestFields.Authority = context.Request.Host.Value;
Http2\Http2WebSocketTests.cs (3)
29Assert.Equal("server.example.com", context.Request.Host.Value); 91Assert.Equal("server.example.com", context.Request.Host.Value); 167Assert.Equal("server.example.com", context.Request.Host.Value);
Http3\Http3ConnectionTests.cs (1)
427authority = context.Request.Host.Value;
Interop.FunctionalTests (1)
Http3\Http3RequestTests.cs (1)
329authority = context.Request.Host.Value;
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
235|| absoluteUri.Authority != request.Host.Value;
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Logging\HttpLoggingRedactionInterceptor.cs (1)
81logContext.AddParameter(HttpLoggingTagNames.Host, context.Request.Host.Value);
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonTranscodingServerCallContext.cs (1)
64protected override string HostCore => HttpContext.Request.Host.Value ?? string.Empty;
Microsoft.AspNetCore.Hosting (4)
Internal\HostingRequestFinishedLog.cs (2)
427 => new KeyValuePair<string, object?>(nameof(request.Host), request.Host.Value), 66_cachedToString = $"Request finished {request.Protocol} {request.Method} {request.Scheme}://{request.Host.Value}{request.PathBase.Value}{request.Path.Value}{request.QueryString.Value} - {response.StatusCode.ToString(CultureInfo.InvariantCulture)} {ValueOrEmptyMarker(response.ContentLength)} {EscapedValueOrEmptyMarker(response.ContentType)} {Elapsed.TotalMilliseconds.ToString("0.0000", CultureInfo.InvariantCulture)}ms";
Internal\HostingRequestStartingLog.cs (2)
305 => new KeyValuePair<string, object?>(nameof(_request.Host), _request.Host.Value), 48_cachedToString = $"Request starting {request.Protocol} {request.Method} {request.Scheme}://{request.Host.Value}{request.PathBase.Value}{request.Path.Value}{request.QueryString.Value} - {EscapedValueOrEmptyMarker(request.ContentType)} {ValueOrEmptyMarker(request.ContentLength)}";
Microsoft.AspNetCore.Http (1)
src\Shared\Debugger\HttpContextDebugFormatter.cs (1)
108var host = request.Host.Value;
Microsoft.AspNetCore.Http.Abstractions (1)
HostString.cs (1)
80[MemberNotNullWhen(true, nameof(Value))]
Microsoft.AspNetCore.Http.Extensions (1)
UriHelper.cs (1)
208var host = request.Host.Value ?? string.Empty;
Microsoft.AspNetCore.Http.Tests (2)
Internal\DefaultHttpRequestTests.cs (2)
78Assert.Equal(expected, host.Value); 98Assert.Equal(expected, host.Value);
Microsoft.AspNetCore.HttpOverrides.Tests (1)
ForwardedHeadersMiddlewareTest.cs (1)
450Assert.NotEqual(hostHeader, context.Request.Host.Value);
Microsoft.AspNetCore.Mvc.Core (2)
Routing\UrlHelperBase.cs (2)
149host = string.IsNullOrEmpty(host) ? ActionContext.HttpContext.Request.Host.Value : host; 211host = string.IsNullOrEmpty(host) ? ActionContext.HttpContext.Request.Host.Value : host;
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingKeyProvider.cs (1)
51.AppendUpperInvariant(request.Host.Value);
Microsoft.AspNetCore.Rewrite (4)
RedirectToNonWwwRule.cs (2)
46if (!request.Host.HasValue || !request.Host.Value.StartsWith(WwwDot, StringComparison.OrdinalIgnoreCase)) 54new HostString(request.Host.Value.Substring(4)), // We verified the hostname begins with "www." already.
RedirectToWwwRule.cs (2)
46if (req.Host.HasValue && req.Host.Value.StartsWith(WwwDot, StringComparison.OrdinalIgnoreCase)) 54new HostString($"www.{context.HttpContext.Request.Host.Value}"),
Microsoft.AspNetCore.TestHost.Tests (3)
ClientHandlerTests.cs (1)
62Assert.Equal("example.com", context.Request.Host.Value);
HttpContextBuilderTests.cs (1)
34Assert.Equal("example.com", context.Request.Host.Value);
WebSocketClientTests.cs (1)
30capturedHost = ctx.Request.Host.Value;