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] minimal patch
Comment on attachment 10875 [details] minimal patch r=me
Landed in r16757.