Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit 6ed1a73

Browse files
author
Cesar Blum Silveira
committed
Test via IHttpRequestFeature.
1 parent c1c63b9 commit 6ed1a73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/Microsoft.AspNetCore.Server.Kestrel.FunctionalTests/RequestTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using Microsoft.AspNetCore.Builder;
1111
using Microsoft.AspNetCore.Hosting;
1212
using Microsoft.AspNetCore.Http;
13+
using Microsoft.AspNetCore.Http.Features;
1314
using Microsoft.AspNetCore.Testing.xunit;
1415
using Newtonsoft.Json;
1516
using Newtonsoft.Json.Linq;
@@ -222,7 +223,7 @@ public void RequestFeatureContainsRawTarget(string requestTarget)
222223
app.Run(async context =>
223224
{
224225
var connection = context.Connection;
225-
Assert.Equal(requestTarget, context.Request.RawTarget);
226+
Assert.Equal(requestTarget, context.Features.Get<IHttpRequestFeature>().RawTarget);
226227
await context.Response.WriteAsync("hello, world");
227228
});
228229
});

0 commit comments

Comments
 (0)