From 50066cc105a06b92787d5c8c6144eb73fdda153e Mon Sep 17 00:00:00 2001 From: a Date: Thu, 15 Aug 2024 22:06:28 +0300 Subject: [PATCH 1/8] verbose curl logging --- dll/network.cpp | 9 +++++++-- dll/steam_http.cpp | 31 ++++++++++++++++++++++++++++++- premake5-deps.lua | 5 ++++- 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/dll/network.cpp b/dll/network.cpp index bd809eca..47cb5f58 100644 --- a/dll/network.cpp +++ b/dll/network.cpp @@ -249,7 +249,7 @@ static void run_at_startup() return; } #if defined(STEAM_WIN32) - WSADATA wsaData; + WSADATA wsaData{}; if (WSAStartup(MAKEWORD(2, 2), &wsaData) != NO_ERROR) { PRINT_DEBUG("Networking WSAStartup error"); return; @@ -257,8 +257,13 @@ static void run_at_startup() for (int i = 0; i < 10; ++i) { //hack: the game Full Mojo Rampage calls WSACleanup on startup so we call WSAStartup a few times so it doesn't get deallocated. - WSAStartup(MAKEWORD(2, 2), &wsaData); + WSADATA wsaData{}; + if (WSAStartup(MAKEWORD(2, 2), &wsaData) != NO_ERROR) { + PRINT_DEBUG("Networking WSAStartup error"); + return; + } } + PRINT_DEBUG("Networking WSAStartup success!"); #else #endif diff --git a/dll/steam_http.cpp b/dll/steam_http.cpp index d78d9c9a..a88ae286 100644 --- a/dll/steam_http.cpp +++ b/dll/steam_http.cpp @@ -160,6 +160,30 @@ bool Steam_HTTP::SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, c return true; } +static int curl_debug_trace( + CURL *handle, curl_infotype type, + char *data, size_t size, + void *clientp +) +{ + // https://curl.se/libcurl/c/CURLOPT_DEBUGFUNCTION.html + std::string text{}; + switch (type) { + case CURLINFO_TEXT: text = "Info: " + std::string(data, size); break; + case CURLINFO_HEADER_IN: text = "<= Recv header"; break; + case CURLINFO_HEADER_OUT: text = "=> Send header"; break; + case CURLINFO_DATA_IN: text = "<= Recv data"; break; + case CURLINFO_DATA_OUT: text = "=> Send data"; break; + case CURLINFO_SSL_DATA_OUT: text = "=> Send SSL data"; break; + case CURLINFO_SSL_DATA_IN: text = "<= Recv SSL data"; break; + + default: text = "[X] ERROR: unknown callback type"; break; + } + + PRINT_DEBUG("%s", text.c_str()); + return 0; +} + void Steam_HTTP::online_http_request(Steam_Http_Request *request, SteamAPICall_t *pCallHandle) { @@ -213,6 +237,11 @@ void Steam_HTTP::online_http_request(Steam_Http_Request *request, SteamAPICall_t send_callresult(); return; } + +#ifndef EMU_RELEASE_BUILD + curl_easy_setopt(chttp, CURLOPT_DEBUGFUNCTION, curl_debug_trace); + curl_easy_setopt(chttp, CURLOPT_VERBOSE, 1L); +#endif // headers std::vector headers{}; @@ -314,7 +343,7 @@ void Steam_HTTP::online_http_request(Steam_Http_Request *request, SteamAPICall_t fclose(hfile); headers.clear(); - PRINT_DEBUG("CURL error code for '%s' [%i] (OK == 0)", request->url.c_str(), (int)res_curl); + PRINT_DEBUG("CURL error code for '%s' [%i = '%s'] (OK == 0)", request->url.c_str(), (int)res_curl, curl_easy_strerror(res_curl)); unsigned int file_size = file_size_(request->target_filepath); if (file_size) { diff --git a/premake5-deps.lua b/premake5-deps.lua index b4bff7d9..d7b75bdb 100644 --- a/premake5-deps.lua +++ b/premake5-deps.lua @@ -535,8 +535,9 @@ local wild_zlib_64 = { if _OPTIONS["build-curl"] or _OPTIONS["all-build"] then local curl_common_defs = { "BUILD_CURL_EXE=OFF", - "BUILD_SHARED_LIBS=OFF", "BUILD_STATIC_CURL=OFF", -- "Build curl executable with static libcurl" + + "BUILD_SHARED_LIBS=OFF", "BUILD_STATIC_LIBS=ON", "BUILD_MISC_DOCS=OFF", "BUILD_TESTING=OFF", @@ -544,6 +545,8 @@ if _OPTIONS["build-curl"] or _OPTIONS["all-build"] then "ENABLE_CURL_MANUAL=OFF", "CURL_USE_OPENSSL=OFF", "CURL_ZLIB=ON", + + -- fix building on Arch Linux "CURL_USE_LIBSSH2=OFF", "CURL_USE_LIBPSL=OFF", "USE_LIBIDN2=OFF", From d74d87c198c6b35f63b924ef5c332d4e33314d8b Mon Sep 17 00:00:00 2001 From: a Date: Fri, 16 Aug 2024 00:53:09 +0300 Subject: [PATCH 2/8] build dep curl with mbedtls as SSL lib to allow using https protocol --- premake5-deps.lua | 89 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 61 insertions(+), 28 deletions(-) diff --git a/premake5-deps.lua b/premake5-deps.lua index d7b75bdb..3f563ae2 100644 --- a/premake5-deps.lua +++ b/premake5-deps.lua @@ -498,23 +498,41 @@ end -- https://github.com/Kitware/CMake/blob/a6853135f569f0b040a34374a15a8361bb73901b/Modules/FindZLIB.cmake#L98C4-L98C13 local zlib_name = '' +local mbedtls_name = '' +local mbedcrypto_name = '' +local mbedx509_name = '' -- name if _ACTION and os.target() == 'windows' then if string.match(_ACTION, 'vs.+') then zlib_name = 'zlibstatic' + mbedtls_name = 'mbedtls' + mbedcrypto_name = 'mbedcrypto' + mbedx509_name = 'mbedx509' elseif string.match(_ACTION, 'gmake.*') then zlib_name = 'libzlibstatic' + mbedtls_name = 'libmbedtls' + mbedcrypto_name = 'libmbedcrypto' + mbedx509_name = 'libmbedx509' else error('unsupported os/action: ' .. os.target() .. ' / ' .. _ACTION) end else -- linux or macos zlib_name = 'libz' + mbedtls_name = 'libmbedtls' + mbedcrypto_name = 'libmbedcrypto' + mbedx509_name = 'mbedx509' end -- extension if _ACTION and string.match(_ACTION, 'vs.+') then zlib_name = zlib_name .. '.lib' + mbedtls_name = mbedtls_name .. '.lib' + mbedcrypto_name = mbedcrypto_name .. '.lib' + mbedx509_name = mbedx509_name .. '.lib' else zlib_name = zlib_name .. '.a' + mbedtls_name = mbedtls_name .. '.a' + mbedcrypto_name = mbedcrypto_name .. '.a' + mbedx509_name = mbedx509_name .. '.a' end local wild_zlib_path_32 = path.join(deps_dir, 'zlib', 'install32', 'lib', zlib_name) @@ -532,6 +550,32 @@ local wild_zlib_64 = { 'ZLIB_LIBRARY="' .. wild_zlib_path_64 .. '"', } +if _OPTIONS["build-mbedtls"] or _OPTIONS["all-build"] then + local mbedtls_common_defs = { + "USE_STATIC_MBEDTLS_LIBRARY=ON", + "USE_SHARED_MBEDTLS_LIBRARY=OFF", + "ENABLE_TESTING=OFF", + "ENABLE_PROGRAMS=OFF", + "MBEDTLS_FATAL_WARNINGS=OFF", + } + if os.target() == 'windows' and string.match(_ACTION, 'vs.+') then + table.insert(mbedtls_common_defs, "MSVC_STATIC_RUNTIME=ON") + else -- linux or macos or MinGW on Windows + table.insert(mbedtls_common_defs, "LINK_WITH_PTHREAD=ON") + end + + if _OPTIONS["32-build"] then + cmake_build('mbedtls', true, mbedtls_common_defs, { + '-mpclmul', + '-msse2', + '-maes', + }) + end + if _OPTIONS["64-build"] then + cmake_build('mbedtls', false, mbedtls_common_defs) + end +end + if _OPTIONS["build-curl"] or _OPTIONS["all-build"] then local curl_common_defs = { "BUILD_CURL_EXE=OFF", @@ -543,8 +587,13 @@ if _OPTIONS["build-curl"] or _OPTIONS["all-build"] then "BUILD_TESTING=OFF", "BUILD_LIBCURL_DOCS=OFF", "ENABLE_CURL_MANUAL=OFF", + "CURL_USE_OPENSSL=OFF", "CURL_ZLIB=ON", + + "CURL_USE_MBEDTLS=ON", + -- "CURL_USE_SCHANNEL=ON", + "CURL_CA_FALLBACK=ON", -- fix building on Arch Linux "CURL_USE_LIBSSH2=OFF", @@ -558,10 +607,20 @@ if _OPTIONS["build-curl"] or _OPTIONS["all-build"] then end if _OPTIONS["32-build"] then - cmake_build('curl', true, merge_list(curl_common_defs, wild_zlib_32)) + cmake_build('curl', true, merge_list(curl_common_defs, merge_list(wild_zlib_32, { + 'MBEDTLS_INCLUDE_DIRS="' .. path.join(deps_dir, 'mbedtls', 'install32', 'include') .. '"', + 'MBEDTLS_LIBRARY="' .. path.join(deps_dir, 'mbedtls', 'install32', 'lib', mbedtls_name) .. '"', + 'MBEDCRYPTO_LIBRARY="' .. path.join(deps_dir, 'mbedtls', 'install32', 'lib', mbedcrypto_name) .. '"', + 'MBEDX509_LIBRARY="' .. path.join(deps_dir, 'mbedtls', 'install32', 'lib', mbedx509_name) .. '"', + }))) end if _OPTIONS["64-build"] then - cmake_build('curl', false, merge_list(curl_common_defs, wild_zlib_64)) + cmake_build('curl', false, merge_list(curl_common_defs, merge_list(wild_zlib_64, { + 'MBEDTLS_INCLUDE_DIRS="' .. path.join(deps_dir, 'mbedtls', 'install64', 'include') .. '"', + 'MBEDTLS_LIBRARY="' .. path.join(deps_dir, 'mbedtls', 'install64', 'lib', mbedtls_name) .. '"', + 'MBEDCRYPTO_LIBRARY="' .. path.join(deps_dir, 'mbedtls', 'install64', 'lib', mbedcrypto_name) .. '"', + 'MBEDX509_LIBRARY="' .. path.join(deps_dir, 'mbedtls', 'install64', 'lib', mbedx509_name) .. '"', + }))) end end @@ -591,32 +650,6 @@ if _OPTIONS["build-protobuf"] or _OPTIONS["all-build"] then end end -if _OPTIONS["build-mbedtls"] or _OPTIONS["all-build"] then - local mbedtls_common_defs = { - "USE_STATIC_MBEDTLS_LIBRARY=ON", - "USE_SHARED_MBEDTLS_LIBRARY=OFF", - "ENABLE_TESTING=OFF", - "ENABLE_PROGRAMS=OFF", - "MBEDTLS_FATAL_WARNINGS=OFF", - } - if os.target() == 'windows' and string.match(_ACTION, 'vs.+') then - table.insert(mbedtls_common_defs, "MSVC_STATIC_RUNTIME=ON") - else -- linux or macos or MinGW on Windows - table.insert(mbedtls_common_defs, "LINK_WITH_PTHREAD=ON") - end - - if _OPTIONS["32-build"] then - cmake_build('mbedtls', true, mbedtls_common_defs, { - '-mpclmul', - '-msse2', - '-maes', - }) - end - if _OPTIONS["64-build"] then - cmake_build('mbedtls', false, mbedtls_common_defs) - end -end - if _OPTIONS["build-ingame_overlay"] or _OPTIONS["all-build"] then -- fixes 32-bit compilation of DX12 local overaly_imgui_cfg_file = path.join(deps_dir, 'ingame_overlay', 'imconfig.imcfg') From c7320465e3d565819356f9a889345cd63e6680ed Mon Sep 17 00:00:00 2001 From: a Date: Fri, 16 Aug 2024 14:31:14 +0300 Subject: [PATCH 3/8] fix compilation warning for mbedtls dep on visual studio --- premake5-deps.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/premake5-deps.lua b/premake5-deps.lua index 3f563ae2..9fd7232d 100644 --- a/premake5-deps.lua +++ b/premake5-deps.lua @@ -564,12 +564,15 @@ if _OPTIONS["build-mbedtls"] or _OPTIONS["all-build"] then table.insert(mbedtls_common_defs, "LINK_WITH_PTHREAD=ON") end + local mbedtls_32_bit_fixes = {} + if _OPTIONS["32-build"] and string.match(_ACTION, 'gmake.*') then + table.insert(mbedtls_32_bit_fixes, '-mpclmul') + table.insert(mbedtls_32_bit_fixes, '-msse2') + table.insert(mbedtls_32_bit_fixes, '-maes') + end + if _OPTIONS["32-build"] then - cmake_build('mbedtls', true, mbedtls_common_defs, { - '-mpclmul', - '-msse2', - '-maes', - }) + cmake_build('mbedtls', true, mbedtls_common_defs, mbedtls_32_bit_fixes) end if _OPTIONS["64-build"] then cmake_build('mbedtls', false, mbedtls_common_defs) From 587e629df950e129bd1023c74da4b2611361bced Mon Sep 17 00:00:00 2001 From: a Date: Fri, 16 Aug 2024 00:53:55 +0300 Subject: [PATCH 4/8] add new required mbedtls link libs to all emu builds --- premake5.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/premake5.lua b/premake5.lua index 70ec1afb..b2f122a4 100644 --- a/premake5.lua +++ b/premake5.lua @@ -273,6 +273,8 @@ local deps_link = { zlib_archive_name .. static_postfix, lib_prefix .. "curl" .. static_postfix, "mbedcrypto" .. static_postfix, + "mbedtls" .. static_postfix, + "mbedx509" .. static_postfix, } -- add protobuf libs table_append(deps_link, { From ed1eec09832b69e04549b7f76cc3deff5420875a Mon Sep 17 00:00:00 2001 From: a Date: Fri, 16 Aug 2024 00:55:26 +0300 Subject: [PATCH 5/8] fix a buffer overrun bug in steam_http where the buffer size wasn't set correctly --- dll/steam_http.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dll/steam_http.cpp b/dll/steam_http.cpp index a88ae286..83d0e329 100644 --- a/dll/steam_http.cpp +++ b/dll/steam_http.cpp @@ -347,7 +347,8 @@ void Steam_HTTP::online_http_request(Steam_Http_Request *request, SteamAPICall_t unsigned int file_size = file_size_(request->target_filepath); if (file_size) { - long long read = Local_Storage::get_file_data(request->target_filepath, (char *)&request->response[0], file_size, 0); + request->response.resize(static_cast(file_size)); + long long read = Local_Storage::get_file_data(request->target_filepath, (char *)&request->response[0], file_size); if (read < 0) read = 0; request->response.resize(static_cast(read)); } From d7fb8403d1050582a251868126429bf84003802e Mon Sep 17 00:00:00 2001 From: a Date: Fri, 16 Aug 2024 00:55:59 +0300 Subject: [PATCH 6/8] bypass ssl verification in steam_http when downloading requests --- dll/steam_http.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dll/steam_http.cpp b/dll/steam_http.cpp index 83d0e329..5210d1a6 100644 --- a/dll/steam_http.cpp +++ b/dll/steam_http.cpp @@ -308,6 +308,7 @@ void Steam_HTTP::online_http_request(Steam_Http_Request *request, SteamAPICall_t curl_easy_setopt(chttp, CURLOPT_TIMEOUT, request->timeout_sec); curl_easy_setopt(chttp, CURLOPT_NOSIGNAL, 1L); curl_easy_setopt(chttp, CURLOPT_USE_SSL, request->requires_valid_ssl ? CURLUSESSL_TRY : CURLUSESSL_NONE); + curl_easy_setopt(chttp, CURLOPT_SSL_VERIFYPEER, 0L); // post data, or get params std::string post_data{}; From afee4c4a727d4bbe56c99c79da1a1e0dad5d8d57 Mon Sep 17 00:00:00 2001 From: a Date: Fri, 16 Aug 2024 14:30:14 +0300 Subject: [PATCH 7/8] workaround a problem in `Steam_HTTP::SetHTTPRequestHeaderValue()` where some games set a cache-control policy which allows only reponses from previous requests --- dll/dll/steam_http.h | 9 ++++++--- dll/steam_http.cpp | 14 +++++++++----- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dll/dll/steam_http.h b/dll/dll/steam_http.h index d9da2fa2..4634a578 100644 --- a/dll/dll/steam_http.h +++ b/dll/dll/steam_http.h @@ -30,12 +30,15 @@ struct Steam_Http_Request { bool requires_valid_ssl = false; constexpr const static char STEAM_DEFAULT_USER_AGENT[] = "Valve/Steam HTTP Client 1.0"; - // GET or POST parameter value on the request + // check Steam_HTTP::SetHTTPRequestHeaderValue() and make sure to bypass the ones that should be reserved std::map headers{ - {"User-Agent", STEAM_DEFAULT_USER_AGENT}, + { "User-Agent", STEAM_DEFAULT_USER_AGENT }, + { "Cache-Control", "max-age=0" }, + { "Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7" }, + { "Upgrade-Insecure-Requests", "1" }, }; - // GET or POST parameter value on the request + // GET or POST parameter value of the request std::map get_or_post_params{}; std::string post_raw{}; diff --git a/dll/steam_http.cpp b/dll/steam_http.cpp index 5210d1a6..86035e67 100644 --- a/dll/steam_http.cpp +++ b/dll/steam_http.cpp @@ -38,7 +38,7 @@ Steam_Http_Request *Steam_HTTP::get_request(HTTPRequestHandle hRequest) // or such. HTTPRequestHandle Steam_HTTP::CreateHTTPRequest( EHTTPMethod eHTTPRequestMethod, const char *pchAbsoluteURL ) { - PRINT_DEBUG("%i %s", eHTTPRequestMethod, pchAbsoluteURL); + PRINT_DEBUG("%i '%s'", eHTTPRequestMethod, pchAbsoluteURL); std::lock_guard lock(global_mutex); if (!pchAbsoluteURL) return INVALID_HTTPREQUEST_HANDLE; @@ -83,7 +83,7 @@ HTTPRequestHandle Steam_HTTP::CreateHTTPRequest( EHTTPMethod eHTTPRequestMethod, // sending the request. This is just so the caller can easily keep track of which callbacks go with which request data. bool Steam_HTTP::SetHTTPRequestContextValue( HTTPRequestHandle hRequest, uint64 ulContextValue ) { - PRINT_DEBUG_ENTRY(); + PRINT_DEBUG("%llu", ulContextValue); std::lock_guard lock(global_mutex); Steam_Http_Request *request = get_request(hRequest); @@ -122,15 +122,19 @@ bool Steam_HTTP::SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, const ch std::lock_guard lock(global_mutex); if (!pchHeaderName || !pchHeaderValue) return false; - std::string headerName(pchHeaderName); - std::transform(headerName.begin(), headerName.end(), headerName.begin(), [](char c){ return (char)std::toupper(c); }); - if (headerName == "USER-AGENT") return false; + if (common_helpers::str_cmp_insensitive(pchHeaderName, "User-Agent")) return false; Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; } + // FIX: appid 1902490 adds the header "Cache-Control: only-if-cached, max-stale=2678400" + // which means a response is returned back only if it was already cached, otherwise the server has to send a 504 "Gateway Timeout" + // just bypass the known ones to be on the safe side + if (common_helpers::str_cmp_insensitive(pchHeaderName, "Cache-Control")) return true; + if (common_helpers::str_cmp_insensitive(pchHeaderName, "Accept")) return true; + request->headers[pchHeaderName] = pchHeaderValue; return true; } From c65e0fc36a9ce931999768ed838d1a2f1dd87794 Mon Sep 17 00:00:00 2001 From: a Date: Fri, 16 Aug 2024 14:34:55 +0300 Subject: [PATCH 8/8] fix a bug in `Steam_HTTP::SendHTTPRequest()` where the ID of the triggered call-result from online requests was completely unrelated to the original request, resulting in timeout --- dll/dll/steam_http.h | 2 +- dll/steam_http.cpp | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/dll/dll/steam_http.h b/dll/dll/steam_http.h index 4634a578..0ead950d 100644 --- a/dll/dll/steam_http.h +++ b/dll/dll/steam_http.h @@ -67,7 +67,7 @@ public ISteamHTTP std::vector requests{}; Steam_Http_Request *get_request(HTTPRequestHandle hRequest); - void online_http_request(Steam_Http_Request *request, SteamAPICall_t *pCallHandle); + void online_http_request(Steam_Http_Request *request, SteamAPICall_t call_res_id); public: Steam_HTTP(class Settings *settings, class Networking *network, class SteamCallResults *callback_results, class SteamCallBacks *callbacks); diff --git a/dll/steam_http.cpp b/dll/steam_http.cpp index 86035e67..08a80194 100644 --- a/dll/steam_http.cpp +++ b/dll/steam_http.cpp @@ -189,12 +189,12 @@ static int curl_debug_trace( } -void Steam_HTTP::online_http_request(Steam_Http_Request *request, SteamAPICall_t *pCallHandle) +void Steam_HTTP::online_http_request(Steam_Http_Request *request, SteamAPICall_t call_res_id) { PRINT_DEBUG("attempting to download from url: '%s', target filepath: '%s'", request->url.c_str(), request->target_filepath.c_str()); - const auto send_callresult = [&]() -> void { + const auto send_callresult = [=]() -> void { struct HTTPRequestCompleted_t data{}; data.m_hRequest = request->handle; data.m_ulContextValue = request->context_value; @@ -202,16 +202,13 @@ void Steam_HTTP::online_http_request(Steam_Http_Request *request, SteamAPICall_t if (request->response.empty() && !settings->force_steamhttp_success) { data.m_bRequestSuccessful = false; data.m_eStatusCode = k_EHTTPStatusCode404NotFound; - } else { data.m_bRequestSuccessful = true; data.m_eStatusCode = k_EHTTPStatusCode200OK; } - auto callres = callback_results->addCallResult(data.k_iCallback, &data, sizeof(data), 0.1); - if (pCallHandle) *pCallHandle = callres; - - callbacks->addCBResult(data.k_iCallback, &data, sizeof(data), 0.1); + callback_results->addCallResult(call_res_id, data.k_iCallback, &data, sizeof(data)); + callbacks->addCBResult(data.k_iCallback, &data, sizeof(data)); }; std::size_t filename_part = request->target_filepath.find_last_of("\\/"); @@ -378,7 +375,10 @@ bool Steam_HTTP::SendHTTPRequest( HTTPRequestHandle hRequest, SteamAPICall_t *pC if (request->response.empty() && request->target_filepath.size() && !settings->disable_networking && settings->download_steamhttp_requests) { - std::thread(&Steam_HTTP::online_http_request, this, request, pCallHandle).detach(); + auto call_res_id = callback_results->reserveCallResult(); + if (pCallHandle) *pCallHandle = call_res_id; + + std::thread(&Steam_HTTP::online_http_request, this, request, call_res_id).detach(); } else { struct HTTPRequestCompleted_t data{}; data.m_hRequest = request->handle; @@ -387,7 +387,6 @@ bool Steam_HTTP::SendHTTPRequest( HTTPRequestHandle hRequest, SteamAPICall_t *pC if (request->response.empty() && !settings->force_steamhttp_success) { data.m_bRequestSuccessful = false; data.m_eStatusCode = k_EHTTPStatusCode404NotFound; - } else { data.m_bRequestSuccessful = true; data.m_eStatusCode = k_EHTTPStatusCode200OK;