nkassis nkassis - 17 days ago 14
HTTP Question

Asp.net Core RC2 how to disable Transfer-Encoding: chunked on response

I'm having issues with certain http clients (Matlab and KDB) having problems with chunked http responses.

Is there a way to disable chunked responses in Kestrel?

Answer

Specify the content-length for responses. This may require buffering. https://github.com/aspnet/BasicMiddleware/blob/dev/samples/ResponseBufferingSample/Startup.cs#L17