问题描述
我用NTLM auth编写了我的API的负载测试(在这里我还要检查NTLM授权用户是否在数据库中存在)。请求期间:
var url = 'https://login:*****@localhost:xxxx/api/authorization/logon';
var payload = { };
var params = {
headers: {
'Content-Type': 'application/json'
},};
let response = http.post(url,params,{auth: "ntlm"});
check(response,{
'status is 200': (r) => r.status === 200
});
}
error =“发布” https:// user:***** @ localhost:xxx / api / authorization / logon“:流错误:流ID 3; HTTP_1_1_required” 。。。 >
为什么? Kestrel服务HTTP / 1.1
解决方法
这是Go标准库的HTTP客户端运行方式中的一个问题,在here中有详细描述,其中对于HTTPS终结点,连接被强制升级到HTTP / 2.0,is not supported by the NTLM protocol。
我不确定,但是也许您可以在Kestrel中禁用此连接升级。