From b9010072aa351ea8d5fb8a95ea2b3b27101bae6c Mon Sep 17 00:00:00 2001 From: Yishai Galatzer Date: Mon, 31 Mar 2014 18:59:19 -0700 Subject: [PATCH] Fix github #164 (when return type is object we always return 204) --- src/Microsoft.AspNet.Mvc.Core/ActionResultFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNet.Mvc.Core/ActionResultFactory.cs b/src/Microsoft.AspNet.Mvc.Core/ActionResultFactory.cs index b298ce65d1..4f7e1400d7 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ActionResultFactory.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ActionResultFactory.cs @@ -38,7 +38,7 @@ namespace Microsoft.AspNet.Mvc throw new InvalidOperationException("HttpActionDescriptor_NoConverterForGenericParamterTypeExists"); } - if (declaredReturnType.IsAssignableFrom(typeof(void)) || actionReturnValue == null) + if (declaredReturnType == typeof(void) || actionReturnValue == null) { return new NoContentResult(); }