Permalink
Browse files

Check if response is stream or object without using reference to refl…

…ection package.
  • Loading branch information...
1 parent 0907379 commit 49bece54c282b0a2b07afbb02754e4cb2e951c6c @nicemd nicemd committed with SteveSandersonMS Dec 21, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Microsoft.AspNetCore.NodeServices/HostingModels/HttpNodeInstance.cs
@@ -91,7 +91,7 @@ private static string MakeCommandLineOptions(int port)
case "application/octet-stream":
// Streamed responses have to be received as System.IO.Stream instances
- if (!typeof(T).GetTypeInfo().IsAssignableFrom(typeof(Stream).GetTypeInfo()))
+ if (typeof(T) != typeof(Stream) && typeof(T) != typeof(object))
{
throw new ArgumentException(
"Node module responded with binary stream. This cannot be converted to the requested generic type: " +

0 comments on commit 49bece5

Please sign in to comment.