summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
Diffstat (limited to 'methods')
-rw-r--r--methods/http.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/methods/http.cc b/methods/http.cc
index d5a00211f..8d3c569c1 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -648,6 +648,9 @@ bool HttpServerState::RunData(FileFd * const File)
/*}}}*/
bool HttpServerState::RunDataToDevNull() /*{{{*/
{
+ // no need to clean up if we discard the connection anyhow
+ if (Persistent == false)
+ return true;
FileFd DevNull("/dev/null", FileFd::WriteOnly);
return RunData(&DevNull);
}