I've noticed that HttpSendRequestEx sometimes returns ERROR_HTTP_HEADER_NOT_FOUND, which I believe is caused by the lpcszHeader member of the INTERNET_BUFFERS struct being a garbage pointer. Note: the CString object returned by headers.latin1() is a temporary, and ResourceLoaderWin is making the mistake of using it beyond its lifetime.
Patch coming up...
Created attachment 10875 [details]
Comment on attachment 10875 [details]
Landed in r16757.