Issue #411: Updated logic in ContentNegotiationMiddleware
#413
+281
−142
ContentNegotiationMiddleware
#413