重构请求解析部分

This commit is contained in:
xx
2024-06-20 01:39:32 +08:00
parent b6689cd478
commit 29afc289bb
22 changed files with 1412 additions and 1968 deletions

View File

@@ -18,9 +18,8 @@ namespace ylib
class response :public network::http::interface_
{
public:
response();
response(network::http::reqpack* reqpack);
~response();
void init(reqpack* rp);
bool send(const char* buf, size_t buf_len, ushort stateNum = 200, const std::string& stateDesc = "OK");
bool send(const ylib::buffer& value, ushort stateNum = 200, const std::string& stateDesc = "OK");
bool send(const std::string& value, ushort stateNum = 200, const std::string& stateDesc = "OK");
@@ -36,8 +35,8 @@ namespace ylib
bool fileoffset(long filesize, long& start, long& len);
private:
std::map<std::string, std::string> m_headers;
bool m_response;
network::http::reqpack* m_reqpack;
bool m_response = false;
network::http::reqpack* m_reqpack = nullptr;
};
}