summaryrefslogtreecommitdiff
path: root/src/net/HttpParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/HttpParser.cpp')
-rw-r--r--src/net/HttpParser.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/net/HttpParser.cpp b/src/net/HttpParser.cpp
index 386a4d9..8006c85 100644
--- a/src/net/HttpParser.cpp
+++ b/src/net/HttpParser.cpp
@@ -1,5 +1,6 @@
#include "tgbot/net/HttpParser.h"
+#include <cstddef>
#include <cstdint>
#include <boost/algorithm/string.hpp>
@@ -133,10 +134,10 @@ string HttpParser::generateResponse(const string& data, const string& mimeType,
unordered_map<string, string> HttpParser::parseHeader(const string& data, bool isRequest) const {
unordered_map<string, string> headers;
- size_t lineStart = 0;
- size_t lineEnd = 0;
- size_t lineSepPos = 0;
- size_t lastLineEnd = string::npos;
+ std::size_t lineStart = 0;
+ std::size_t lineEnd = 0;
+ std::size_t lineSepPos = 0;
+ std::size_t lastLineEnd = string::npos;
while (lastLineEnd != lineEnd) {
lastLineEnd = lineEnd;
bool isFirstLine = lineEnd == 0;
@@ -167,7 +168,7 @@ unordered_map<string, string> HttpParser::parseHeader(const string& data, bool i
}
string HttpParser::extractBody(const string& data) const {
- size_t headerEnd = data.find("\r\n\r\n");
+ std::size_t headerEnd = data.find("\r\n\r\n");
if (headerEnd == string::npos) {
return data;
}