Index: src/Server.cc =================================================================== --- src/Server.cc (revision 115) +++ src/Server.cc (working copy) @@ -723,8 +723,7 @@ // XXX: entry->bytesWanted returns contentSize-1 if entry can accept data. // We have to add 1 to avoid suspending forever. - const size_t bytesWanted = entry->bytesWanted(Range(0, contentSize)); - const size_t spaceAvailable = bytesWanted > 0 ? (bytesWanted + 1) : 0; + const size_t spaceAvailable = entry->bytesWanted(Range(0, contentSize+1)); if (spaceAvailable < contentSize ) { // No or partial body data consuming @@ -734,8 +733,7 @@ entry->deferProducer(call); } - // XXX: bytesWanted API does not allow us to write just one byte! - if (!spaceAvailable && contentSize > 1) { + if (!spaceAvailable && contentSize > 0) { debugs(11, 5, HERE << "NOT storing " << contentSize << " bytes of adapted " << "response body at offset " << adaptedBodySource->consumedSize()); return;