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

Commit be421c9

Browse files
author
Cesar Blum Silveira
committed
Add RawTarget property to IHttpRequestFeature (#596).
1 parent a49ba74 commit be421c9

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

Diff for: src/Microsoft.AspNetCore.Http.Features/IHttpRequestFeature.cs

+5
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ public interface IHttpRequestFeature
4848
/// </summary>
4949
string QueryString { get; set; }
5050

51+
/// <summary>
52+
/// The request target as it was sent in the HTTP request.
53+
/// </summary>
54+
string RawTarget { get; set; }
55+
5156
/// <summary>
5257
/// Headers included in the request, aggregated by header name. The values are not split
5358
/// or merged across header lines. E.g. The following headers:

Diff for: src/Microsoft.AspNetCore.Http/Features/HttpRequestFeature.cs

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public HttpRequestFeature()
1717
PathBase = string.Empty;
1818
Path = string.Empty;
1919
QueryString = string.Empty;
20+
RawTarget = string.Empty;
2021
}
2122

2223
public string Protocol { get; set; }
@@ -25,6 +26,7 @@ public HttpRequestFeature()
2526
public string PathBase { get; set; }
2627
public string Path { get; set; }
2728
public string QueryString { get; set; }
29+
public string RawTarget { get; set; }
2830
public IHeaderDictionary Headers { get; set; }
2931
public Stream Body { get; set; }
3032
}

Diff for: src/Microsoft.AspNetCore.Owin/OwinFeatureCollection.cs

+6
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ string IHttpRequestFeature.QueryString
102102
set { Prop(OwinConstants.RequestQueryString, Utilities.RemoveQuestionMark(value)); }
103103
}
104104

105+
string IHttpRequestFeature.RawTarget
106+
{
107+
get { throw new NotSupportedException(); }
108+
set { throw new NotSupportedException(); }
109+
}
110+
105111
IHeaderDictionary IHttpRequestFeature.Headers
106112
{
107113
get { return Utilities.MakeHeaderDictionary(Prop<IDictionary<string, string[]>>(OwinConstants.RequestHeaders)); }

0 commit comments

Comments
 (0)