Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNX: Request renderer: Remove ServerVariable from API in ASP.NET5 #40

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ public class AspNetRequestValueLayoutRenderer : AspNetLayoutRendererBase
/// <docgen category='Rendering Options' order='10' />
public string Cookie { get; set; }

#if !DNX
//missing in DNX (at least for ASP.NET 5 RC1)
/// <summary>
/// Gets or sets the ServerVariables item to be rendered.
/// </summary>
/// <docgen category='Rendering Options' order='10' />
public string ServerVariable { get; set; }
#endif

/// <summary>
/// Gets or sets the Headers item to be rendered.
Expand Down Expand Up @@ -109,15 +112,12 @@ protected override void DoAppend(StringBuilder builder, LogEventInfo logEvent)
#endif

}
#if !DNX
else if (this.ServerVariable != null)
{
#if !DNX
builder.Append(httpRequest.ServerVariables[this.ServerVariable]);
#else

throw new NotSupportedException();
#endif
}
#endif
else if (this.Header != null)
{
string header = httpRequest.Headers[this.Header];
Expand Down