summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2020-08-04 10:34:38 +0000
committerJulian Andres Klode <jak@debian.org>2020-08-04 10:34:38 +0000
commit7d222636954ec95382149e31b314e9828ba05a2e (patch)
treedcdde8d6c88e0f76d6ced0a528b092eee99b13d8 /methods
parent63c0657ea54c9268bc1855d5eac92bc636532bd6 (diff)
parent27d36318b98f3a070fb24557ce691718ef4eec34 (diff)
Merge branch 'pu/http-fixes-2' into 'master'
Pu/http fixes 2 See merge request apt-team/apt!125
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)
{