6 implementations of IHttpRequestFeature
Microsoft.AspNetCore.Hosting.Tests (1)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Owin (1)
Microsoft.AspNetCore.Server.HttpSys (1)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
183 references to IHttpRequestFeature
InMemory.FunctionalTests (13)
InProcessWebSite (2)
Microsoft.AspNetCore.Hosting.Tests (11)
Microsoft.AspNetCore.Http (14)
Microsoft.AspNetCore.Http.Connections (3)
Microsoft.AspNetCore.Http.Features (2)
Microsoft.AspNetCore.Http.Tests (21)
Microsoft.AspNetCore.Owin (21)
OwinEnvironment.cs (10)
40if (context.Features.Get<IHttpRequestFeature>() == null)
42throw new ArgumentException("Missing required feature: " + nameof(IHttpRequestFeature) + ".", nameof(context));
52{ OwinConstants.RequestProtocol, new FeatureMap<IHttpRequestFeature>(feature => feature.Protocol, () => string.Empty, (feature, value) => feature.Protocol = Convert.ToString(value, CultureInfo.InvariantCulture)) },
53{ OwinConstants.RequestScheme, new FeatureMap<IHttpRequestFeature>(feature => feature.Scheme, () => string.Empty, (feature, value) => feature.Scheme = Convert.ToString(value, CultureInfo.InvariantCulture)) },
54{ OwinConstants.RequestMethod, new FeatureMap<IHttpRequestFeature>(feature => feature.Method, () => string.Empty, (feature, value) => feature.Method = Convert.ToString(value, CultureInfo.InvariantCulture)) },
55{ OwinConstants.RequestPathBase, new FeatureMap<IHttpRequestFeature>(feature => feature.PathBase, () => string.Empty, (feature, value) => feature.PathBase = Convert.ToString(value, CultureInfo.InvariantCulture)) },
56{ OwinConstants.RequestPath, new FeatureMap<IHttpRequestFeature>(feature => feature.Path, () => string.Empty, (feature, value) => feature.Path = Convert.ToString(value, CultureInfo.InvariantCulture)) },
57{ OwinConstants.RequestQueryString, new FeatureMap<IHttpRequestFeature>(feature => Utilities.RemoveQuestionMark(feature.QueryString), () => string.Empty,
59{ OwinConstants.RequestHeaders, new FeatureMap<IHttpRequestFeature>(feature => Utilities.MakeDictionaryStringArray(feature.Headers), (feature, value) => feature.Headers = Utilities.MakeHeaderDictionary((IDictionary<string, string[]>)value)) },
60{ OwinConstants.RequestBody, new FeatureMap<IHttpRequestFeature>(feature => feature.Body, () => Stream.Null, (feature, value) => feature.Body = (Stream)value) },
Microsoft.AspNetCore.Owin.Tests (4)
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (1)
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (1)
Microsoft.AspNetCore.Rewrite (1)
Microsoft.AspNetCore.Rewrite.Tests (1)
Microsoft.AspNetCore.Server.HttpSys (10)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (22)
Microsoft.AspNetCore.Server.IIS (10)
Microsoft.AspNetCore.Server.Kestrel.Core (20)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (7)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
Microsoft.AspNetCore.TestHost.Tests (17)
ClientHandlerTests.cs (17)
27Assert.Equal(HttpProtocol.Http11, features.Get<IHttpRequestFeature>().Protocol);
28Assert.Equal("GET", features.Get<IHttpRequestFeature>().Method);
29Assert.Equal("https", features.Get<IHttpRequestFeature>().Scheme);
30Assert.Equal("/api/a%2Fb c", features.Get<IHttpRequestFeature>().Path);
31Assert.NotNull(features.Get<IHttpRequestFeature>().Body);
32Assert.NotNull(features.Get<IHttpRequestFeature>().Headers);
37Assert.Equal("example.com", features.Get<IHttpRequestFeature>().Headers["host"]);
76Assert.Equal(HttpProtocol.Http11, features.Get<IHttpRequestFeature>().Protocol);
77Assert.Equal("GET", features.Get<IHttpRequestFeature>().Method);
78Assert.Equal("https", features.Get<IHttpRequestFeature>().Scheme);
79Assert.Equal("/A/Path", features.Get<IHttpRequestFeature>().PathBase);
80Assert.Equal("/and/file.txt", features.Get<IHttpRequestFeature>().Path);
81Assert.Equal("?and=query", features.Get<IHttpRequestFeature>().QueryString);
82Assert.NotNull(features.Get<IHttpRequestFeature>().Body);
83Assert.NotNull(features.Get<IHttpRequestFeature>().Headers);
88Assert.Equal("example.com", features.Get<IHttpRequestFeature>().Headers["host"]);
282Assert.Equal("?and=something", features.Get<IHttpRequestFeature>().QueryString);