From: Christos Tsantilas Date: Tue, 22 Nov 2011 11:12:32 +0000 (+0200) Subject: Author: Alex Rousskov X-Git-Tag: BumpSslServerFirst.take01~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cfbd4a2417da91aac416a70fe2652abd2b89c267;p=thirdparty%2Fsquid.git Author: Alex Rousskov 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. --- diff --git a/src/store.cc b/src/store.cc index dbdcec5ab1..c9cfa116ba 100644 --- a/src/store.cc +++ b/src/store.cc @@ -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);