summaryrefslogtreecommitdiff
path: root/src/HttpHeaderProcessor.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-12-27 18:39:47 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-12-27 18:40:08 +0900
commitb1132d6b10cd3791b9529d7031d723fd0e2d8215 (patch)
tree9ce465b42bf09372118335c7c619bb2b41869eaf /src/HttpHeaderProcessor.cc
parent4abad2f64c9ff80144a61c5a9c2bea144852b883 (diff)
make clang-format using clang-format-3.6
Diffstat (limited to 'src/HttpHeaderProcessor.cc')
-rw-r--r--src/HttpHeaderProcessor.cc36
1 files changed, 15 insertions, 21 deletions
diff --git a/src/HttpHeaderProcessor.cc b/src/HttpHeaderProcessor.cc
index 52dfc758..c3b501a8 100644
--- a/src/HttpHeaderProcessor.cc
+++ b/src/HttpHeaderProcessor.cc
@@ -75,18 +75,19 @@ enum {
} // namespace
HttpHeaderProcessor::HttpHeaderProcessor(ParserMode mode)
- : mode_(mode),
- state_(mode == CLIENT_PARSER ? PREV_RES_VERSION : PREV_METHOD),
- lastBytesProcessed_(0),
- lastFieldHdKey_(HttpHeader::MAX_INTERESTING_HEADER),
- result_(new HttpHeader())
-{}
+ : mode_(mode),
+ state_(mode == CLIENT_PARSER ? PREV_RES_VERSION : PREV_METHOD),
+ lastBytesProcessed_(0),
+ lastFieldHdKey_(HttpHeader::MAX_INTERESTING_HEADER),
+ result_(new HttpHeader())
+{
+}
HttpHeaderProcessor::~HttpHeaderProcessor() {}
namespace {
-size_t
-getToken(std::string& buf, const unsigned char* data, size_t length, size_t off)
+size_t getToken(std::string& buf, const unsigned char* data, size_t length,
+ size_t off)
{
size_t j = off;
while (j < length && !util::isLws(data[j]) && !util::isCRLF(data[j])) {
@@ -98,10 +99,8 @@ getToken(std::string& buf, const unsigned char* data, size_t length, size_t off)
} // namespace
namespace {
-size_t getFieldNameToken(std::string& buf,
- const unsigned char* data,
- size_t length,
- size_t off)
+size_t getFieldNameToken(std::string& buf, const unsigned char* data,
+ size_t length, size_t off)
{
size_t j = off;
while (j < length && data[j] != ':' && !util::isLws(data[j]) &&
@@ -114,8 +113,8 @@ size_t getFieldNameToken(std::string& buf,
} // namespace
namespace {
-size_t
-getText(std::string& buf, const unsigned char* data, size_t length, size_t off)
+size_t getText(std::string& buf, const unsigned char* data, size_t length,
+ size_t off)
{
size_t j = off;
while (j < length && !util::isCRLF(data[j])) {
@@ -127,9 +126,7 @@ getText(std::string& buf, const unsigned char* data, size_t length, size_t off)
} // namespace
namespace {
-size_t ignoreText(std::string& buf,
- const unsigned char* data,
- size_t length,
+size_t ignoreText(std::string& buf, const unsigned char* data, size_t length,
size_t off)
{
size_t j = off;
@@ -493,9 +490,6 @@ std::unique_ptr<HttpHeader> HttpHeaderProcessor::getResult()
return std::move(result_);
}
-std::string HttpHeaderProcessor::getHeaderString() const
-{
- return headers_;
-}
+std::string HttpHeaderProcessor::getHeaderString() const { return headers_; }
} // namespace aria2