]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix 'large transactions are getting stuck' since rev.14093
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 1 Aug 2015 02:22:12 +0000 (19:22 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 1 Aug 2015 02:22:12 +0000 (19:22 -0700)
Packer removal of packerClean() also removed several implicit uses of
StoreEntry::flush() without adding an explicit call in their place.

All users of StoreEntry::buffer() must follow it with a call to
StoreEntry:flush() to release the buffering and output the buffer
contents.

src/HttpRequest.cc
src/store.cc

index bc60ec3600e76df7ecdb5d8843b3c302f31bf384..2388ac1c130037ea8f1e5b466622276b0b1aafdf 100644 (file)
@@ -359,6 +359,7 @@ HttpRequest::swapOut(StoreEntry * e)
     assert(e);
     e->buffer();
     pack(e);
+    e->flush();
 }
 
 /* packs request-line and headers, appends <crlf> terminator */
index 55a54f4d05e41f48532f31c2c850433e6187c4ef..55e54e7e363017a055337bff32ba33ca9bbfeb6d 100644 (file)
@@ -1918,7 +1918,7 @@ StoreEntry::replaceHttpReply(HttpReply *rep, bool andStartWriting)
 void
 StoreEntry::startWriting()
 {
-    /* TODO: when we store headers serparately remove the header portion */
+    /* TODO: when we store headers separately remove the header portion */
     /* TODO: mark the length of the headers ? */
     /* We ONLY want the headers */
 
@@ -1934,6 +1934,7 @@ StoreEntry::startWriting()
     EBIT_CLR(flags, ENTRY_FWD_HDR_WAIT);
 
     rep->body.packInto(this);
+    flush();
 }
 
 char const *