I am trying to use wininet to do successful HTTP requests to a server running webmin.
If I type the following into a browser's address bar:
Then it works just fine.Code:https://192.168.1.11:10000/session_login.cgi?user=root&pass=private
When I send a HttpOpenRequest:
I get back:Code:hReq = HttpOpenRequest(hSession, NULL, "/session_login.cgi?user=root&pass=private","HTTP/1.1",NULL,(const char**)media, INTERNET_FLAG_SECURE | INTERNET_FLAG_IGNORE_CERT_DATE_INVALID |INTERNET_FLAG_IGNORE_CERT_CN_INVALID | INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_UI | INTERNET_FLAG_PRAGMA_NOCACHE | INTERNET_FLAG_NO_CACHE_WRITE ,0);
<h1>Error - No cookies</h1>
<pre>Your browser does not support cookies, which are required for this web server to work in session authentication mode</pre>
I always thought that wininet handled cookies for you, but maybe I was wrong. Anyone else have any expertise here?