summaryrefslogtreecommitdiff
path: root/src/HttpHeaderProcessor.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-03-09 12:24:01 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-03-09 12:24:01 +0000
commit032c7c28083e17bdcfd763b3cf81447b06a07978 (patch)
treee5cc5ceb050773165df41eb7f0aed3f2a48205a0 /src/HttpHeaderProcessor.cc
parentca3f6e57f35c67f67c3b4f64cedded8ca23237e8 (diff)
2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
type cleanup for allmost all remaining files.
Diffstat (limited to 'src/HttpHeaderProcessor.cc')
-rw-r--r--src/HttpHeaderProcessor.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/HttpHeaderProcessor.cc b/src/HttpHeaderProcessor.cc
index 9cbaa6a8..c581b654 100644
--- a/src/HttpHeaderProcessor.cc
+++ b/src/HttpHeaderProcessor.cc
@@ -45,7 +45,7 @@ HttpHeaderProcessor::HttpHeaderProcessor():_limit(4096) {}
HttpHeaderProcessor::~HttpHeaderProcessor() {}
-void HttpHeaderProcessor::update(const unsigned char* data, int32_t length)
+void HttpHeaderProcessor::update(const unsigned char* data, size_t length)
{
checkHeaderLimit(length);
strm.write(reinterpret_cast<const char*>(data), length);
@@ -57,10 +57,10 @@ void HttpHeaderProcessor::update(const std::string& data)
strm << data;
}
-void HttpHeaderProcessor::checkHeaderLimit(int32_t incomingLength)
+void HttpHeaderProcessor::checkHeaderLimit(size_t incomingLength)
{
strm.seekg(0, std::ios::end);
- if((int32_t)strm.tellg()+incomingLength > _limit) {
+ if((size_t)strm.tellg()+incomingLength > _limit) {
throw new DlAbortEx("Too large http header");
}
}
@@ -75,7 +75,7 @@ bool HttpHeaderProcessor::eoh() const
}
}
-int32_t HttpHeaderProcessor::getPutBackDataLength() const
+size_t HttpHeaderProcessor::getPutBackDataLength() const
{
std::string str = strm.str();
std::string::size_type delimpos = std::string::npos;