OCT 1. 更新SCG协议

This commit is contained in:
黄昕 2024-12-06 14:51:04 +08:00
parent 93f6f05f49
commit 099717a3d8
1 changed files with 3 additions and 1 deletions

View File

@ -454,7 +454,9 @@ namespace sion {
private: private:
size_t resp_body_start_pos_ = -1; size_t resp_body_start_pos_ = -1;
String Sourse2Str() { return source_.size() == 0 ? "" : std::string(source_.data(), 0, source_.size()); } String Sourse2Str() {
return (source_.size() <= 0 || source_.size() >= (1024 * 1024 * 1024)) ? "" : std::string(source_.data(), 0, source_.size());
}
bool CanParseHeader() { bool CanParseHeader() {
auto buf_str = Sourse2Str(); auto buf_str = Sourse2Str();