From 2e1a9a8df92abb5e564e3f91db7deabe6d0f2725 Mon Sep 17 00:00:00 2001 From: hagen Date: Thu, 26 May 2016 00:00:00 +0000 Subject: [PATCH] * HTTP.{cpp,h} : move length() method to base class --- HTTP.cpp | 2 +- HTTP.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/HTTP.cpp b/HTTP.cpp index 254cab95..83f1ac3f 100644 --- a/HTTP.cpp +++ b/HTTP.cpp @@ -279,7 +279,7 @@ namespace http { return false; } - long int HTTPRes::length() { + long int HTTPMsg::length() { unsigned long int length = 0; auto it = headers.find("Content-Length"); if (it == headers.end()) diff --git a/HTTP.h b/HTTP.h index 7f73285f..15efc989 100644 --- a/HTTP.h +++ b/HTTP.h @@ -59,6 +59,9 @@ namespace http { void add_header(const char *name, const char *value, bool replace = false); void del_header(const char *name); + + /** @brief Returns declared message length or -1 if unknown */ + long int length(); }; struct HTTPReq : HTTPMsg { @@ -113,9 +116,6 @@ namespace http { /** @brief Checks that response declared as chunked data */ bool is_chunked(); - - /** @brief Returns declared response length or -1 if unknown */ - long int length(); }; /**