Use the right collection, so accessing a non existent ContentType on a response doesn't throw and return null instead
This commit is contained in:
parent
fe1011e507
commit
a34826d90b
|
|
@ -78,8 +78,8 @@ namespace Microsoft.AspNet.PipelineCore
|
|||
{
|
||||
get
|
||||
{
|
||||
var contentTypeValues = HttpResponseInformation.Headers[Constants.Headers.ContentType];
|
||||
return contentTypeValues.Length == 0 ? null : contentTypeValues[0];
|
||||
var contentType = Headers[Constants.Headers.ContentType];
|
||||
return contentType;
|
||||
}
|
||||
set
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue