Add RawTarget property to IHttpRequestFeature (#596).
This commit is contained in:
parent
0c8fb843e4
commit
8212694874
|
|
@ -48,6 +48,17 @@ namespace Microsoft.AspNetCore.Http.Features
|
|||
/// </summary>
|
||||
string QueryString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The request target as it was sent in the HTTP request. This property contains the
|
||||
/// raw path and full query, as well as other request targets such as * for OPTIONS
|
||||
/// requests (https://tools.ietf.org/html/rfc7230#section-5.3).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This property is not used internally for routing or authorization decisions. It has not
|
||||
/// been UrlDecoded and care should be taken in its use.
|
||||
/// </remarks>
|
||||
string RawTarget { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Headers included in the request, aggregated by header name. The values are not split
|
||||
/// or merged across header lines. E.g. The following headers:
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ namespace Microsoft.AspNetCore.Http.Features
|
|||
PathBase = string.Empty;
|
||||
Path = string.Empty;
|
||||
QueryString = string.Empty;
|
||||
RawTarget = string.Empty;
|
||||
}
|
||||
|
||||
public string Protocol { get; set; }
|
||||
|
|
@ -25,6 +26,7 @@ namespace Microsoft.AspNetCore.Http.Features
|
|||
public string PathBase { get; set; }
|
||||
public string Path { get; set; }
|
||||
public string QueryString { get; set; }
|
||||
public string RawTarget { get; set; }
|
||||
public IHeaderDictionary Headers { get; set; }
|
||||
public Stream Body { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,6 +102,12 @@ namespace Microsoft.AspNetCore.Owin
|
|||
set { Prop(OwinConstants.RequestQueryString, Utilities.RemoveQuestionMark(value)); }
|
||||
}
|
||||
|
||||
string IHttpRequestFeature.RawTarget
|
||||
{
|
||||
get { return string.Empty; }
|
||||
set { throw new NotSupportedException(); }
|
||||
}
|
||||
|
||||
IHeaderDictionary IHttpRequestFeature.Headers
|
||||
{
|
||||
get { return Utilities.MakeHeaderDictionary(Prop<IDictionary<string, string[]>>(OwinConstants.RequestHeaders)); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue