@@ -23,8 +23,8 @@ namespace JsonApiDotNetCore.Middleware
2323 /// </summary>
2424 public sealed class JsonApiMiddleware
2525 {
26- private static readonly MediaTypeHeaderValue _mediaType = MediaTypeHeaderValue . Parse ( HeaderConstants . MediaType ) ;
27- private static readonly MediaTypeHeaderValue _atomicOperationsMediaType = MediaTypeHeaderValue . Parse ( HeaderConstants . AtomicOperationsMediaType ) ;
26+ private static readonly MediaTypeHeaderValue MediaType = MediaTypeHeaderValue . Parse ( HeaderConstants . MediaType ) ;
27+ private static readonly MediaTypeHeaderValue AtomicOperationsMediaType = MediaTypeHeaderValue . Parse ( HeaderConstants . AtomicOperationsMediaType ) ;
2828
2929 private readonly RequestDelegate _next ;
3030
@@ -51,7 +51,7 @@ public async Task Invoke(HttpContext httpContext,
5151 if ( primaryResourceContext != null )
5252 {
5353 if ( ! await ValidateContentTypeHeaderAsync ( HeaderConstants . MediaType , httpContext , options . SerializerSettings ) ||
54- ! await ValidateAcceptHeaderAsync ( _mediaType , httpContext , options . SerializerSettings ) )
54+ ! await ValidateAcceptHeaderAsync ( MediaType , httpContext , options . SerializerSettings ) )
5555 {
5656 return ;
5757 }
@@ -63,7 +63,7 @@ public async Task Invoke(HttpContext httpContext,
6363 else if ( IsOperationsRequest ( routeValues ) )
6464 {
6565 if ( ! await ValidateContentTypeHeaderAsync ( HeaderConstants . AtomicOperationsMediaType , httpContext , options . SerializerSettings ) ||
66- ! await ValidateAcceptHeaderAsync ( _atomicOperationsMediaType , httpContext , options . SerializerSettings ) )
66+ ! await ValidateAcceptHeaderAsync ( AtomicOperationsMediaType , httpContext , options . SerializerSettings ) )
6767 {
6868 return ;
6969 }
0 commit comments