Limit the HTTP body content to dump/log.

This commit is contained in:
Chunting Gu
2018-10-11 14:32:34 +08:00
parent d159ce46bf
commit e3e9a22181
4 changed files with 54 additions and 4 deletions
+5
View File
@@ -40,6 +40,11 @@ const std::size_t kInvalidLength = std::string::npos;
// Default timeout for reading response.
const int kMaxReadSeconds = 30;
// Max size of the HTTP body to dump/log.
// If the HTTP, e.g., response, has a very large content, it will be truncated
// when dumped/logged.
const std::size_t kMaxDumpSize = 2048;
// HTTP headers.
extern const std::string kHost;
extern const std::string kContentType;