]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 22 Nov 2011 11:12:32 +0000 (13:12 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 22 Nov 2011 11:12:32 +0000 (13:12 +0200)
Bug 3377: assertion failed: store.cc:885: "store_status == STORE_PENDING"

The StoreEntry::write in the case of an empty write, calls the StoreEntry
handlers. It is possible one of these handlers will change the state of the
store entry or abort it. The next call of the StoreEntry::write will cause
this assertion.

The block of code which calls the StoreSntry handlers in the case of an empty
write, added to allow forward http headers to the client even if no body data
arrived yet (bug 1750). There is not need for this part of code in the latest
squid releases, so it is safe to be removed.

src/store.cc

index dbdcec5ab124989faea3739ae0397087826e8302..c9cfa116baaf07673349590d23bd4a5ea68977e5 100644 (file)
@@ -877,20 +877,6 @@ StoreEntry::write (StoreIOBuffer writeBuffer)
     PROF_start(StoreEntry_write);
     assert(store_status == STORE_PENDING);
 
-    if (!writeBuffer.length) {
-        /* the headers are received already, but we have not received
-         * any body data. There are BROKEN abuses of HTTP which require
-         * the headers to be passed along before any body data - see
-         * http://developer.apple.com/documentation/QuickTime/QTSS/Concepts/chapter_2_section_14.html
-         * for an example of such bad behaviour. To accomodate this, if
-         * we have a empty write arrive, we flush to our clients.
-         * -RBC 20060903
-         */
-        PROF_stop(StoreEntry_write);
-        invokeHandlers();
-        return;
-    }
-
     debugs(20, 5, "storeWrite: writing " << writeBuffer.length << " bytes for '" << getMD5Text() << "'");
     PROF_stop(StoreEntry_write);
     storeGetMemSpace(writeBuffer.length);