1
0
forked from cat/WebBase

Fixed write data... again. Fuck my programmer life.

This commit is contained in:
2025-07-05 01:17:05 +03:00
parent fb3f1e7c37
commit 809c833259
4 changed files with 47 additions and 16 deletions

View File

@@ -31,13 +31,14 @@ public:
void sendResponse(std::string status, std::string mime, std::string data);
// Request itself
std::string requestType, requestPath;
std::string requestType, requestPath, responseText;
std::unordered_map<std::string, std::string> headers, args;
std::string bodyContent;
private:
HTTPrequest(asio::io_context &context);
void processRequest();
void waitForClientClose();
// Breaking Header to in lines
void processHTTPHeader();
@@ -60,7 +61,7 @@ public:
// Responses
static std::unordered_map<
std::string,
std::unordered_map<std::string, std::function<void(HTTPrequest &self)>>>
std::unordered_map<std::string, std::function<void(HTTPrequest *self)>>>
responseMethods;
private: