diff options
Diffstat (limited to 'methods/http.cc')
-rw-r--r-- | methods/http.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/methods/http.cc b/methods/http.cc index 1d2c41337..76d4f6b5a 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -700,6 +700,8 @@ ResultState HttpServerState::Die(RequestState &Req) { unsigned int LErrno = errno; + Close(); + // Dump the buffer to the file if (Req.State == RequestState::Data) { @@ -727,7 +729,6 @@ ResultState HttpServerState::Die(RequestState &Req) if (In.IsLimit() == false && Req.State != RequestState::Header && Persistent == true) { - Close(); if (LErrno == 0) { _error->Error(_("Error reading from server. Remote end closed connection")); @@ -746,7 +747,6 @@ ResultState HttpServerState::Die(RequestState &Req) return ResultState::TRANSIENT_ERROR; // We may have got multiple responses back in one packet.. - Close(); return ResultState::SUCCESSFUL; } |