diff --git a/src/XrdHttp/XrdHttpReq.cc b/src/XrdHttp/XrdHttpReq.cc index 89898c462f2..460a1108ccc 100644 --- a/src/XrdHttp/XrdHttpReq.cc +++ b/src/XrdHttp/XrdHttpReq.cc @@ -1365,8 +1365,9 @@ int XrdHttpReq::ProcessHTTPReq() { // We want to be invoked again after this request is finished - // Only if there is data to fetch from the socket - if (prot->BuffUsed() > 0) + // Only if there is data to fetch from the socket or there will + // never be more data + if (prot->BuffUsed() > 0 || length == 0) return 0; return 1;