diff --git a/src/Http/HttpRequestSplitter.cpp b/src/Http/HttpRequestSplitter.cpp index 89554c90..6b4c0123 100644 --- a/src/Http/HttpRequestSplitter.cpp +++ b/src/Http/HttpRequestSplitter.cpp @@ -126,6 +126,10 @@ size_t HttpRequestSplitter::remainDataSize() { return _remain_data_size; } +const char *HttpRequestSplitter::remainData() const { + return _remain_data.data(); +} + } /* namespace mediakit */ diff --git a/src/Http/HttpRequestSplitter.h b/src/Http/HttpRequestSplitter.h index 6e77a7c9..01e77df0 100644 --- a/src/Http/HttpRequestSplitter.h +++ b/src/Http/HttpRequestSplitter.h @@ -75,6 +75,11 @@ protected: */ size_t remainDataSize(); + /** + * 获取剩余数据指针 + */ + const char *remainData() const; + private: ssize_t _content_len = 0; size_t _remain_data_size = 0;