On Fri, 2020-06-12 at 16:32 +1000, Alistair Leslie-Hughes wrote:
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index 24455d858a6..105e292b15d 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -1042,6 +1042,38 @@ static BOOL request_set_option( struct object_header *hdr, DWORD option, void *b FIXME("WINHTTP_OPTION_CONNECT_RETRIES\n"); return TRUE;
- case WINHTTP_OPTION_UPGRADE_TO_WEB_SOCKET:
- {
BYTE buf[16];
WCHAR str[64];
DWORD length = 64;
ARRAY_SIZE(str)
int i;
add_request_headers(request, L"Connection: Upgrade", -1,
WINHTTP_ADDREQ_FLAG_ADD | WINHTTP_ADDREQ_FLAG_REPLACE);
add_request_headers(request, L"Upgrade: websocket", -1,
WINHTTP_ADDREQ_FLAG_ADD | WINHTTP_ADDREQ_FLAG_REPLACE);
add_request_headers(request, L"Sec-WebSocket-Version: 13", -1,
WINHTTP_ADDREQ_FLAG_ADD | WINHTTP_ADDREQ_FLAG_REPLACE);
Can you add a test to show that headers are set here? A simple websocket echo test would be nice too. And please check add_request_headers for failure.
for(i = 0; i < sizeof(buf); i++)
buf[i] = rand() % 256;
Should this be stored somewhere?