mirror of https://github.com/aria2/aria2
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made string listeral to static const std::string: "Content-Range", "Content-Length" * src/HttpHeader.cc * src/HttpHeader.hpull/1/head
parent
00f385c3b3
commit
0c821d0ad7
|
@ -1,3 +1,10 @@
|
||||||
|
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Made string listeral to static const std::string:
|
||||||
|
"Content-Range", "Content-Length"
|
||||||
|
* src/HttpHeader.cc
|
||||||
|
* src/HttpHeader.h
|
||||||
|
|
||||||
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2008-05-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Made string listeral to static const std::string.
|
Made string listeral to static const std::string.
|
||||||
|
|
|
@ -58,6 +58,10 @@ const std::string HttpHeader::CONNECTION("Connection");
|
||||||
|
|
||||||
const std::string HttpHeader::CLOSE("close");
|
const std::string HttpHeader::CLOSE("close");
|
||||||
|
|
||||||
|
const std::string HttpHeader::CONTENT_LENGTH("Content-Length");
|
||||||
|
|
||||||
|
const std::string HttpHeader::CONTENT_RANGE("Content-Range");
|
||||||
|
|
||||||
const std::string HttpHeader::HTTP_1_1("HTTP/1.1");
|
const std::string HttpHeader::HTTP_1_1("HTTP/1.1");
|
||||||
|
|
||||||
void HttpHeader::put(const std::string& name, const std::string& value) {
|
void HttpHeader::put(const std::string& name, const std::string& value) {
|
||||||
|
@ -103,9 +107,9 @@ uint64_t HttpHeader::getFirstAsULLInt(const std::string& name) const {
|
||||||
|
|
||||||
RangeHandle HttpHeader::getRange() const
|
RangeHandle HttpHeader::getRange() const
|
||||||
{
|
{
|
||||||
std::string rangeStr = getFirst("Content-Range");
|
std::string rangeStr = getFirst(CONTENT_RANGE);
|
||||||
if(rangeStr.empty()) {
|
if(rangeStr.empty()) {
|
||||||
std::string contentLengthStr = getFirst("Content-Length");
|
std::string contentLengthStr = getFirst(CONTENT_LENGTH);
|
||||||
if(contentLengthStr.empty()) {
|
if(contentLengthStr.empty()) {
|
||||||
return SharedHandle<Range>(new Range());
|
return SharedHandle<Range>(new Range());
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -97,6 +97,10 @@ public:
|
||||||
|
|
||||||
static const std::string CLOSE;
|
static const std::string CLOSE;
|
||||||
|
|
||||||
|
static const std::string CONTENT_LENGTH;
|
||||||
|
|
||||||
|
static const std::string CONTENT_RANGE;
|
||||||
|
|
||||||
static const std::string HTTP_1_1;
|
static const std::string HTTP_1_1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue