summaryrefslogtreecommitdiff
path: root/methods/basehttp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/basehttp.cc')
-rw-r--r--methods/basehttp.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/methods/basehttp.cc b/methods/basehttp.cc
index 3786e2e6c..f2c4156e1 100644
--- a/methods/basehttp.cc
+++ b/methods/basehttp.cc
@@ -882,7 +882,11 @@ unsigned long long BaseHttpMethod::FindMaximumObjectSizeInQueue() const /*{{{*/
{
unsigned long long MaxSizeInQueue = 0;
for (FetchItem *I = Queue; I != 0 && I != QueueBack; I = I->Next)
+ {
+ if (I->MaximumSize == 0)
+ return 0;
MaxSizeInQueue = std::max(MaxSizeInQueue, I->MaximumSize);
+ }
return MaxSizeInQueue;
}
/*}}}*/