mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
Streamed responses can be be Object or Stream
See issue https://github.com/aspnet/JavaScriptServices/issues/518
This commit is contained in:
@@ -91,7 +91,7 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels
|
|||||||
|
|
||||||
case "application/octet-stream":
|
case "application/octet-stream":
|
||||||
// Streamed responses have to be received as System.IO.Stream instances
|
// Streamed responses have to be received as System.IO.Stream instances
|
||||||
if (typeof(T) != typeof(Stream))
|
if (!typeof(T).GetTypeInfo().IsAssignableFrom(typeof(Stream).GetTypeInfo()))
|
||||||
{
|
{
|
||||||
throw new ArgumentException(
|
throw new ArgumentException(
|
||||||
"Node module responded with binary stream. This cannot be converted to the requested generic type: " +
|
"Node module responded with binary stream. This cannot be converted to the requested generic type: " +
|
||||||
|
|||||||
Reference in New Issue
Block a user