Support data streaming on server side.

This commit is contained in:
Chunting Gu
2019-08-13 17:35:01 +08:00
parent 0ea4ab7526
commit 9b13dceab9
13 changed files with 167 additions and 59 deletions
+3 -4
View File
@@ -21,7 +21,9 @@ public:
}
private:
void CreateBodyHandler() override;
bool OnHeadersEnd() override {
return true;
}
// Parse HTTP start line; E.g., "HTTP/1.1 200 OK".
bool ParseStartLine(const std::string& line) override;
@@ -33,9 +35,6 @@ private:
// The result response message.
Response* response_ = nullptr;
// Data streaming or not.
bool stream_ = false;
// The response for HEAD request could also have `Content-Length` header,
// set this flag to ignore it.
bool ignroe_body_ = false;