People have been kissing Diab's feet for his fix.
So it must have potential to go into 4.0.3 and from the reactions it seems to work. I wonder why it was not implemented right away. Does is also break something?
The bug it fixes seems pretty serious. And I have also experienced that it takes 10-20 seconds for topics to save. I always thought it was some cron job that took CPU time.
Since noone else have picked up this one I am attacking it from a testing perspective. I have patched both my production Motion TWiki and the "merlin" test twiki4 with the suggested patch to see that at least it makes no damage.
If it makes no harm and maybe even reduce the mysterious occations where it can take 10-30 seconds to save a topic then I will check it in on SVN.
I have attached the patch as a file to this bug report if anyone wishes to give it a try. It is a small clean patch that should work both on a clean 4.0.2 and latest 4.0.3beta and latest svn.
Now there seems to be a problem with develop.twiki.org so it cannot deliver attachments with viewfile.
Trying a direct link
After having tested for several hours and studied error logs my conclusion is that the fix does not harm anything and the reports from TWiki:Codev.TWikiOnApache2dot0Hangs
tells me that this fix should go into 4.0.3.
Also checked it into DEVELOP.