summaryrefslogtreecommitdiff
path: root/methods/server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/server.cc')
-rw-r--r--methods/server.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/methods/server.cc b/methods/server.cc
index 4a961f454..223737901 100644
--- a/methods/server.cc
+++ b/methods/server.cc
@@ -532,6 +532,11 @@ int ServerMethod::Loop()
// Run the data
bool Result = true;
+
+ // ensure we don't fetch too much
+ if (Queue->ExpectedSize > 0)
+ Server->ExpectedSize = Queue->ExpectedSize;
+
if (Server->HaveContent)
Result = Server->RunData(File);
@@ -605,7 +610,10 @@ int ServerMethod::Loop()
QueueBack = Queue;
}
else
+ {
+ Server->Close();
Fail(true);
+ }
}
break;
}