React to string[] -> StringValue changes.
This commit is contained in:
parent
b95f67733d
commit
7b11506cc0
|
|
@ -118,7 +118,7 @@ namespace Microsoft.AspNet.Diagnostics.Elm
|
||||||
}
|
}
|
||||||
if (context.Request.Query.ContainsKey("name"))
|
if (context.Request.Query.ContainsKey("name"))
|
||||||
{
|
{
|
||||||
var namePrefix = context.Request.Query.GetValues("name")[0];
|
var namePrefix = context.Request.Query["name"];
|
||||||
options.NamePrefix = namePrefix;
|
options.NamePrefix = namePrefix;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ using Microsoft.AspNet.Builder;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.AspNet.Http.Features;
|
using Microsoft.AspNet.Http.Features;
|
||||||
using Microsoft.Framework.Logging;
|
using Microsoft.Framework.Logging;
|
||||||
|
using Microsoft.Net.Http.Headers;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Diagnostics
|
namespace Microsoft.AspNet.Diagnostics
|
||||||
{
|
{
|
||||||
|
|
@ -87,10 +88,10 @@ namespace Microsoft.AspNet.Diagnostics
|
||||||
private Task ClearCacheHeaders(object state)
|
private Task ClearCacheHeaders(object state)
|
||||||
{
|
{
|
||||||
var response = (HttpResponse)state;
|
var response = (HttpResponse)state;
|
||||||
response.Headers.Set("Cache-Control", "no-cache");
|
response.Headers[HeaderNames.CacheControl] = "no-cache";
|
||||||
response.Headers.Set("Pragma", "no-cache");
|
response.Headers[HeaderNames.Pragma] = "no-cache";
|
||||||
response.Headers.Set("Expires", "-1");
|
response.Headers[HeaderNames.Expires] = "-1";
|
||||||
response.Headers.Remove("ETag");
|
response.Headers.Remove(HeaderNames.ETag);
|
||||||
return Task.FromResult(0);
|
return Task.FromResult(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ using System.Globalization
|
||||||
#line 3 "DiagnosticsPage.cshtml"
|
#line 3 "DiagnosticsPage.cshtml"
|
||||||
|
|
||||||
Response.ContentType = "text/html";
|
Response.ContentType = "text/html";
|
||||||
string error = Request.Query.Get("error");
|
string error = Request.Query["error"];
|
||||||
if (!string.IsNullOrWhiteSpace(error))
|
if (!string.IsNullOrWhiteSpace(error))
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "User requested error '{0}'", error));
|
throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "User requested error '{0}'", error));
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
|
using Microsoft.Framework.Primitives;
|
||||||
|
|
||||||
namespace Microsoft.AspNet.Diagnostics.Views
|
namespace Microsoft.AspNet.Diagnostics.Views
|
||||||
{
|
{
|
||||||
|
|
@ -38,14 +39,6 @@ namespace Microsoft.AspNet.Diagnostics.Views
|
||||||
/// Request headers.
|
/// Request headers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Model class contains collection")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Model class contains collection")]
|
||||||
public IDictionary<string, string[]> Headers { get; set; }
|
public IDictionary<string, StringValues> Headers { get; set; }
|
||||||
|
|
||||||
/* TODO:
|
|
||||||
/// <summary>
|
|
||||||
/// The request environment
|
|
||||||
/// </summary>
|
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Model class contains collection")]
|
|
||||||
public HttpContext Environment { get; set; }
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue