Skip to content

Commit 49bece5

Browse files
nicemdSteveSandersonMS
authored andcommitted
Check if response is stream or object without using reference to reflection package.
1 parent 0907379 commit 49bece5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/Microsoft.AspNetCore.NodeServices/HostingModels/HttpNodeInstance.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected override async Task<T> InvokeExportAsync<T>(
9191

9292
case"application/octet-stream":
9393
// Streamed responses have to be received as System.IO.Stream instances
94-
if(!typeof(T).GetTypeInfo().IsAssignableFrom(typeof(Stream).GetTypeInfo()))
94+
if(typeof(T)!=typeof(Stream)&&typeof(T)!=typeof(object))
9595
{
9696
thrownewArgumentException(
9797
"Node module responded with binary stream. This cannot be converted to the requested generic type: "+

0 commit comments

Comments
(0)