整理http相关代码

This commit is contained in:
ziyue
2021-09-30 16:10:09 +08:00
parent a548fcd709
commit 15edbeac3e
11 changed files with 251 additions and 209 deletions

View File

@@ -23,8 +23,8 @@
namespace mediakit {
HttpStringBody::HttpStringBody(const string &str){
_str = str;
HttpStringBody::HttpStringBody(string str){
_str = std::move(str);
}
ssize_t HttpStringBody::remainSize() {
@@ -43,6 +43,7 @@ Buffer::Ptr HttpStringBody::readData(size_t size) {
}
//////////////////////////////////////////////////////////////////
HttpFileBody::HttpFileBody(const string &filePath){
std::shared_ptr<FILE> fp(fopen(filePath.data(), "rb"), [](FILE *fp) {
if(fp){