Last active
October 7, 2016 17:51
-
-
Save PhroZenOne/9b443e7e0c6b3a489d2c255026c06faa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Engine/Source/Runtime/Online/HTTP/Private/Curl/CurlHttp.cpp b/Engine/Source/Runtime/Online/HTTP/Private/Curl/CurlHttp.cpp | |
index 57fbc87..8ecdc21 100644 | |
--- a/Engine/Source/Runtime/Online/HTTP/Private/Curl/CurlHttp.cpp | |
+++ b/Engine/Source/Runtime/Online/HTTP/Private/Curl/CurlHttp.cpp | |
@@ -399,7 +399,7 @@ size_t FCurlHttpRequest::DebugCallback(CURL * Handle, curl_infotype DebugInfoTyp | |
case CURLINFO_TEXT: | |
{ | |
// in this case DebugInfo is a C string (see http://curl.haxx.se/libcurl/c/debug.html) | |
- FString DebugText(ANSI_TO_TCHAR(DebugInfo)); | |
+ FString DebugText(DebugInfoSize, (TCHAR*)StringCast<TCHAR>(static_cast<const ANSICHAR*>(DebugInfo), static_cast<int32>(DebugInfoSize)).Get()); | |
DebugText.ReplaceInline(TEXT("\n"), TEXT(""), ESearchCase::CaseSensitive); | |
DebugText.ReplaceInline(TEXT("\r"), TEXT(""), ESearchCase::CaseSensitive); | |
UE_LOG(LogHttp, VeryVerbose, TEXT("%p: '%s'"), this, *DebugText); | |
@@ -417,7 +417,7 @@ size_t FCurlHttpRequest::DebugCallback(CURL * Handle, curl_infotype DebugInfoTyp | |
case CURLINFO_HEADER_OUT: | |
{ | |
- FString DebugText(ANSI_TO_TCHAR(DebugInfo)); | |
+ FString DebugText(DebugInfoSize, (TCHAR*)StringCast<TCHAR>(static_cast<const ANSICHAR*>(DebugInfo), static_cast<int32>(DebugInfoSize)).Get()); | |
DebugText.ReplaceInline(TEXT("\n"), TEXT(""), ESearchCase::CaseSensitive); | |
DebugText.ReplaceInline(TEXT("\r"), TEXT(""), ESearchCase::CaseSensitive); | |
UE_LOG(LogHttp, VeryVerbose, TEXT("%p: Sent header (%d bytes) - %s"), this, DebugInfoSize, *DebugText); | |
@@ -444,7 +444,7 @@ size_t FCurlHttpRequest::DebugCallback(CURL * Handle, curl_infotype DebugInfoTyp | |
UE_LOG(LogHttp, VeryVerbose, TEXT("%p: DebugCallback: Unknown DebugInfoType=%d (DebugInfoSize: %d bytes)"), this, (int32)DebugInfoType, DebugInfoSize); | |
break; | |
} | |
- | |
+ | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment