From 833510fbf1aa4d32559c270602a7b3c83d6691f9 Mon Sep 17 00:00:00 2001 From: Mr_Goldberg Date: Thu, 25 Jun 2020 11:26:19 -0400 Subject: [PATCH] Very basic implementations of a few steamhttp functions. --- dll/steam_http.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dll/steam_http.cpp b/dll/steam_http.cpp index a5b7e3ac..f3088a5b 100644 --- a/dll/steam_http.cpp +++ b/dll/steam_http.cpp @@ -116,7 +116,7 @@ bool Steam_HTTP::SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, c // header and only do a local cache lookup rather than sending any actual remote request. bool Steam_HTTP::SendHTTPRequest( HTTPRequestHandle hRequest, SteamAPICall_t *pCallHandle ) { - PRINT_DEBUG("SendHTTPRequest\n"); + PRINT_DEBUG("SendHTTPRequest %u %p\n", hRequest, pCallHandle); Steam_Http_Request *request = get_request(hRequest); if (!request) { return false; @@ -276,7 +276,12 @@ bool Steam_HTTP::GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, float * bool Steam_HTTP::SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, const char *pchContentType, uint8 *pubBody, uint32 unBodyLen ) { PRINT_DEBUG("SetHTTPRequestRawPostBody\n"); - return false; + Steam_Http_Request *request = get_request(hRequest); + if (!request) { + return false; + } + + return true; } @@ -360,5 +365,11 @@ bool Steam_HTTP::SetHTTPRequestAbsoluteTimeoutMS( HTTPRequestHandle hRequest, ui bool Steam_HTTP::GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest, bool *pbWasTimedOut ) { PRINT_DEBUG("GetHTTPRequestWasTimedOut\n"); - return false; + Steam_Http_Request *request = get_request(hRequest); + if (!request) { + return false; + } + + if (pbWasTimedOut) *pbWasTimedOut = false; + return true; }