summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-03-18 22:45:07 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-03-18 22:45:07 +0900
commit5535ed5f958c8d04f561352c4d52360e122fee77 (patch)
treecb3457ee3267be15e2b8233ca7ca365f569f6d19 /src
parentd88e8150334418cff509f9707b0bbf75e7e3c05c (diff)
Code cleanup
Diffstat (limited to 'src')
-rw-r--r--src/HttpRequest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc
index 5efc56f4..0a55b734 100644
--- a/src/HttpRequest.cc
+++ b/src/HttpRequest.cc
@@ -202,10 +202,10 @@ std::string HttpRequest::createRequest()
(request_->isPipeliningEnabled() || getStartByte() > 0 ||
getEndByte() > 0)) {
std::string rangeHeader(fmt("bytes=%" PRId64 "-", getStartByte()));
- if(request_->isPipeliningEnabled()) {
- rangeHeader += util::itos(getEndByte());
- } else if(getEndByte() > 0) {
- // FTP via http proxy does not support endbytes
+ if(request_->isPipeliningEnabled() || getEndByte() > 0) {
+ // FTP via http proxy does not support endbytes, but in that
+ // case, request_->isPipeliningEnabled() is false and
+ // getEndByte() is 0.
rangeHeader += util::itos(getEndByte());
}
builtinHds.push_back(std::make_pair("Range:", rangeHeader));