Asp.net Core RC2如何禁用Transfer-Encoding:响应时chunked [英] Asp.net Core RC2 how to disable Transfer-Encoding: chunked on response

查看:627
本文介绍了Asp.net Core RC2如何禁用Transfer-Encoding:响应时chunked的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到某些http客户端(Matlab和KDB)遇到分块http响应问题。

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

有没有办法在Kestrel中禁用分块响应?

Is there a way to disable chunked responses in Kestrel?

推荐答案

指定响应的内容长度。这可能需要缓冲。
https://github.com/ aspnet / BasicMiddleware / blob / dev / samples / ResponseBufferingSample / Startup.cs#L17

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

这篇关于Asp.net Core RC2如何禁用Transfer-Encoding:响应时chunked的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆