summaryrefslogtreecommitdiff
path: root/methods/http.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/http.cc')
-rw-r--r--methods/http.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/methods/http.cc b/methods/http.cc
index 40a37a8c6..161ecf067 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -846,13 +846,6 @@ ResultState HttpServerState::Go(bool ToFile, RequestState &Req)
return Die(Req);
}
- if (ServerFd->Fd() != -1 && FD_ISSET(ServerFd->Fd(), &wfds))
- {
- errno = 0;
- if (Out.Write(ServerFd) == false)
- return Die(Req);
- }
-
// Send data to the file
if (FileFD->Fd() != -1 && FD_ISSET(FileFD->Fd(), &wfds))
{
@@ -863,6 +856,13 @@ ResultState HttpServerState::Go(bool ToFile, RequestState &Req)
}
}
+ if (ServerFd->Fd() != -1 && FD_ISSET(ServerFd->Fd(), &wfds))
+ {
+ errno = 0;
+ if (Out.Write(ServerFd) == false)
+ return Die(Req);
+ }
+
if (Req.MaximumSize > 0 && Req.File.IsOpen() && Req.File.Failed() == false && Req.File.Tell() > Req.MaximumSize)
{
Owner->SetFailReason("MaximumSizeExceeded");