From: Ilia Docin ilya.docin@contentai.ru
--- dlls/winhttp/session.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index 74c8d973f35..d57c36ac736 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -206,6 +206,19 @@ static BOOL session_set_option( struct object_header *hdr, DWORD option, void *b TRACE( "%#lx\n", session->secure_protocols ); return TRUE; } + case WINHTTP_OPTION_AUTOLOGON_POLICY: + { + DWORD policy; + if (buflen != sizeof(DWORD)) + { + SetLastError( ERROR_INSUFFICIENT_BUFFER ); + return FALSE; + } + policy = *(DWORD *)buffer; + TRACE( "%#lx\n", policy ); + hdr->logon_policy = policy; + return TRUE; + } case WINHTTP_OPTION_DISABLE_FEATURE: SetLastError( ERROR_WINHTTP_INCORRECT_HANDLE_TYPE ); return FALSE;
Can you add a test? https://learn.microsoft.com/en-us/windows/win32/winhttp/option-flags lists this flag as invalid for session handles but it could be wrong.
Sorry, I missed that this flag is valid only for request handlers. Although Windows version of software I'm working on shows that WinHttpSetOption returns true for session handler and Automatic Logon Policy arguments too. But I realized from the documentation that it doesn't make sense to support it for sessions, so I'l close this PR.
This merge request was closed by Ilia Docin.