summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
Diffstat (limited to 'methods')
-rw-r--r--methods/http.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/methods/http.cc b/methods/http.cc
index 9cfc91330..77348d760 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -845,7 +845,8 @@ ResultState HttpServerState::Go(bool ToFile, RequestState &Req)
}
// Send data to the file
- if (FileFD->Fd() != -1 && FD_ISSET(FileFD->Fd(), &wfds))
+ if (FileFD->Fd() != -1 && ((In.WriteSpace() == true && ToFile == true) ||
+ FD_ISSET(FileFD->Fd(), &wfds)))
{
if (In.Write(FileFD) == false)
{