summaryrefslogtreecommitdiff
path: root/src/HttpHeader.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-04 22:27:58 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-04 22:27:58 +0900
commitf84d2253b2250ed5760398c189bfc8bf8dff1f69 (patch)
tree19a84b1b75161152d5c3c338282596a2537e4c1d /src/HttpHeader.h
parent6267676e8bba1566aa68a757359c9481b135cc6d (diff)
Rewritten util::split and added its iterator version.
Iterator based functions util::startsWith, util::endsWith, util::streq, util::strieq were added.
Diffstat (limited to 'src/HttpHeader.h')
-rw-r--r--src/HttpHeader.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/HttpHeader.h b/src/HttpHeader.h
index a9be6660..776fcdbd 100644
--- a/src/HttpHeader.h
+++ b/src/HttpHeader.h
@@ -95,6 +95,12 @@ public:
void setVersion(const std::string& version);
+ template<typename InputIterator>
+ void setVersion(InputIterator first, InputIterator last)
+ {
+ version_.assign(first, last);
+ }
+
const std::string& getMethod() const
{
return method_;
@@ -102,6 +108,12 @@ public:
void setMethod(const std::string& method);
+ template<typename InputIterator>
+ void setMethod(InputIterator first, InputIterator last)
+ {
+ method_.assign(first, last);
+ }
+
const std::string& getRequestPath() const
{
return requestPath_;
@@ -109,6 +121,12 @@ public:
void setRequestPath(const std::string& requestPath);
+ template<typename InputIterator>
+ void setRequestPath(InputIterator first, InputIterator last)
+ {
+ requestPath_.assign(first, last);
+ }
+
void fill
(std::string::const_iterator first,
std::string::const_iterator last);