Force HTTP/1.1 for NTLM when UseHttp1ForNtlm is enabled

Added logic to set HTTP/1.1 and exact version policy for NTLM
authentication requests when the UseHttp1ForNtlm option is true.
This ensures compatibility with NTLM endpoints requiring HTTP/1.1.
This commit is contained in:
2026-03-16 13:41:04 +01:00
parent 56b604bd35
commit b38d53248c

View File

@@ -98,6 +98,11 @@ public class InvokeRecActionViewCommandHandler(
case EndpointAuthType.NtlmAuth:
if (!string.IsNullOrWhiteSpace(action.EndpointAuthUsername))
{
if (_options.UseHttp1ForNtlm)
{
httpReq.Version = HttpVersion.Version11;
httpReq.VersionPolicy = HttpVersionPolicy.RequestVersionExact;
}
var endpointAuthPassword = action.EndpointAuthPassword
#if DEBUG
?.Replace("%NTLM_PW%", config?.GetValue<string>("%NTLM_PW%"))