Implement sceHttp library

This commit is contained in:
ANR2ME authored and Henrik Rydgård committed 2025-01-05 19:14:15 +01:00
1 parent 06b10f54cc
commit 0012818eb7
9 files changed
+1139 -76

No files matched your search

+4 -1
View File
@@ -383,7 +383,7 @@ int Client::SendRequestWithData(const char *method, const RequestParams &req, co
return 0;
}
int Client::ReadResponseHeaders(net::Buffer *readbuf, std::vector<std::string> &responseHeaders, net::RequestProgress *progress) {
int Client::ReadResponseHeaders(net::Buffer *readbuf, std::vector<std::string> &responseHeaders, net::RequestProgress *progress, std::string * httpCode) {
// Snarf all the data we can into RAM. A little unsafe but hey.
static constexpr float CANCEL_INTERVAL = 0.25f;
bool ready = false;
@@ -421,6 +421,9 @@ int Client::ReadResponseHeaders(net::Buffer *readbuf, std::vector<std::string> &
return -1;
}
if (httpCode)
*httpCode = line;
while (true) {
int sz = readbuf->TakeLineCRLF(&line);
if (!sz || sz < 0)