From f5007267627cc28ee10531d3d36b85739d756e02 Mon Sep 17 00:00:00 2001 From: ANR2ME Date: Sun, 3 Sep 2023 07:48:49 +0700 Subject: [PATCH] Changing httpCode to statusLine --- Common/Net/HTTPClient.cpp | 6 +++--- Common/Net/HTTPClient.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Common/Net/HTTPClient.cpp b/Common/Net/HTTPClient.cpp index d38b6b1c4b..b002c94adc 100644 --- a/Common/Net/HTTPClient.cpp +++ b/Common/Net/HTTPClient.cpp @@ -383,7 +383,7 @@ int Client::SendRequestWithData(const char *method, const RequestParams &req, co return 0; } -int Client::ReadResponseHeaders(net::Buffer *readbuf, std::vector &responseHeaders, net::RequestProgress *progress, std::string * httpCode) { +int Client::ReadResponseHeaders(net::Buffer *readbuf, std::vector &responseHeaders, net::RequestProgress *progress, std::string *statusLine) { // Snarf all the data we can into RAM. A little unsafe but hey. static constexpr float CANCEL_INTERVAL = 0.25f; bool ready = false; @@ -421,8 +421,8 @@ int Client::ReadResponseHeaders(net::Buffer *readbuf, std::vector & return -1; } - if (httpCode) - *httpCode = line; + if (statusLine) + *statusLine = line; while (true) { int sz = readbuf->TakeLineCRLF(&line); diff --git a/Common/Net/HTTPClient.h b/Common/Net/HTTPClient.h index 867b4035f7..0c5d978fb5 100644 --- a/Common/Net/HTTPClient.h +++ b/Common/Net/HTTPClient.h @@ -71,7 +71,7 @@ public: int SendRequest(const char *method, const RequestParams &req, const char *otherHeaders, net::RequestProgress *progress); int SendRequestWithData(const char *method, const RequestParams &req, const std::string &data, const char *otherHeaders, net::RequestProgress *progress); - int ReadResponseHeaders(net::Buffer *readbuf, std::vector &responseHeaders, net::RequestProgress *progress, std::string* httpCode = nullptr); + int ReadResponseHeaders(net::Buffer *readbuf, std::vector &responseHeaders, net::RequestProgress *progress, std::string *statusLine = nullptr); // If your response contains a response, you must read it. int ReadResponseEntity(net::Buffer *readbuf, const std::vector &responseHeaders, Buffer *output, net::RequestProgress *progress);