File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/Middleware/Diagnostics/src/DeveloperExceptionPage Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public class DeveloperExceptionPageMiddleware
34
34
private readonly DiagnosticSource _diagnosticSource ;
35
35
private readonly ExceptionDetailsProvider _exceptionDetailsProvider ;
36
36
private readonly Func < ErrorContext , Task > _exceptionHandler ;
37
- private static readonly MediaTypeHeaderValue _textPlainMediaType = new MediaTypeHeaderValue ( "text/html" ) ;
37
+ private static readonly MediaTypeHeaderValue _textHtmlMediaType = new MediaTypeHeaderValue ( "text/html" ) ;
38
38
39
39
/// <summary>
40
40
/// Initializes a new instance of the <see cref="DeveloperExceptionPageMiddleware"/> class
@@ -135,7 +135,7 @@ private Task DisplayException(ErrorContext errorContext)
135
135
var acceptHeader = headers . Accept ;
136
136
137
137
// If the client does not ask for HTML just format the exception as plain text
138
- if ( acceptHeader == null || ! acceptHeader . Any ( h => h . IsSubsetOf ( _textPlainMediaType ) ) )
138
+ if ( acceptHeader == null || ! acceptHeader . Any ( h => h . IsSubsetOf ( _textHtmlMediaType ) ) )
139
139
{
140
140
httpContext . Response . ContentType = "text/plain" ;
141
141
You can’t perform that action at this time.
0 commit comments