aboutsummaryrefslogtreecommitdiff
path: root/src/common/windows/http_upload.h
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com>2014-11-03 17:05:39 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com>2014-11-03 17:05:39 +0000
commitc971cf439cec3d412e297199db2416523c1a889d (patch)
tree491b9867f0696cb5007d627c82fc183085effc5a /src/common/windows/http_upload.h
parentIntroduce microdump writer class. (diff)
downloadbreakpad-c971cf439cec3d412e297199db2416523c1a889d.tar.xz
Fix Windows client compilation on mingw.
A=Jacek Caban <jacek@codeweavers.com>, R=ted at http://breakpad.appspot.com/548002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1399 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/windows/http_upload.h')
-rw-r--r--src/common/windows/http_upload.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/common/windows/http_upload.h b/src/common/windows/http_upload.h
index 0594cde3..e485b70e 100644
--- a/src/common/windows/http_upload.h
+++ b/src/common/windows/http_upload.h
@@ -38,8 +38,8 @@
// Disable exception handler warnings.
#pragma warning(disable : 4530)
-#include <Windows.h>
-#include <WinInet.h>
+#include <windows.h>
+#include <wininet.h>
#include <map>
#include <string>
@@ -80,7 +80,7 @@ class HTTPUpload {
// this merely checks (via the return value) that we were successfully
// able to retrieve exactly as many bytes of content in the response as
// were specified in the Content-Length header.
- static bool HTTPUpload::ReadResponse(HINTERNET request, wstring* response);
+ static bool ReadResponse(HINTERNET request, wstring* response);
// Generates a new multipart boundary for a POST request
static wstring GenerateMultipartBoundary();
@@ -104,7 +104,12 @@ class HTTPUpload {
static wstring UTF8ToWide(const string &utf8);
// Converts a UTF16 string to UTF8.
- static string WideToUTF8(const wstring &wide);
+ static string WideToUTF8(const wstring &wide) {
+ return WideToMBCP(wide, CP_UTF8);
+ }
+
+ // Converts a UTF16 string to specified code page.
+ static string WideToMBCP(const wstring &wide, unsigned int cp);
// Checks that the given list of parameters has only printable
// ASCII characters in the parameter name, and does not contain