From bram at smartelectronix.com Wed Mar 14 15:28:09 2007 From: bram at smartelectronix.com (Bram - Smartelectronix) Date: Wed, 14 Mar 2007 15:28:09 +0100 Subject: [Tramline-dev] strange bug: posting forms with ONLY file upload field Message-ID: <45F80679.5060606@smartelectronix.com> hello everyone, yesterday night i pent about 2 hours looking for a bug with tramline and this is the strange thing that happens: apache 2.0.52 mod_python 2.7.11 ( django trunk, but i'm sure that's irrelevant ) when an upload form ONLY contains a file field [1] tramline is losing a few bytes at the end of all files (and really small files are reduced to size 0). However, when apache is restarted, the last few bytes magically appear at the end of the files ( even though they already have been moved to the repository directory) and the md5 is correct. When adding a second field (for example a hidden field) [2] in the form everything works just fine. perhaps an interesting bug? - bram [1]
[2] From faassen at startifact.com Wed Mar 14 19:26:35 2007 From: faassen at startifact.com (Martijn Faassen) Date: Wed, 14 Mar 2007 19:26:35 +0100 Subject: [Tramline-dev] strange bug: posting forms with ONLY file upload field In-Reply-To: <45F80679.5060606@smartelectronix.com> References: <45F80679.5060606@smartelectronix.com> Message-ID: <8928d4e90703141126w1a043cfcj8b2e2af34ee603f2@mail.gmail.com> Hi there, Did you patch mod_python as instructed in the tramline documentation? If you don't remove that flush there, you get really weird behavior. I haven't been able to discover what is causing this, unfortunately. Regards, Martijn From bram at smartelectronix.com Thu Mar 15 13:45:37 2007 From: bram at smartelectronix.com (Bram - Smartelectronix) Date: Thu, 15 Mar 2007 13:45:37 +0100 Subject: [Tramline-dev] strange bug: posting forms with ONLY file upload field In-Reply-To: <8928d4e90703141126w1a043cfcj8b2e2af34ee603f2@mail.gmail.com> References: <45F80679.5060606@smartelectronix.com> <8928d4e90703141126w1a043cfcj8b2e2af34ee603f2@mail.gmail.com> Message-ID: <45F93FF1.8000703@smartelectronix.com> Hi, Martijn Faassen wrote: > Did you patch mod_python as instructed in the tramline documentation? > If you don't remove that flush there, you get really weird behavior. I > haven't been able to discover what is causing this, unfortunately. Yes: [root]# diff apache.py ....../apache.py 192c192 < # filter.flush() --- > filter.flush() Today I double-checked the date of the pyc files, and noticed: -rw-r--r-- 1 root root 30505 Mar 8 17:40 apache.py -rw-r--r-- 1 root root 22968 Jan 24 14:22 apache.pyc -rw-r--r-- 1 root root 22742 Jan 24 14:22 apache.pyo But, after deletion and recompilation of the *.pyc and *.pyo, nothing changed. (Although adding the hidden field still takes care of the problem.) Am I correct in assuming I only need to patch the apache.py in the current python directory and not in the mod_python install and then reinstall mod_python? - bram From faassen at startifact.com Thu Mar 15 14:49:28 2007 From: faassen at startifact.com (Martijn Faassen) Date: Thu, 15 Mar 2007 14:49:28 +0100 Subject: [Tramline-dev] strange bug: posting forms with ONLY file upload field In-Reply-To: <45F93FF1.8000703@smartelectronix.com> References: <45F80679.5060606@smartelectronix.com> <8928d4e90703141126w1a043cfcj8b2e2af34ee603f2@mail.gmail.com> <45F93FF1.8000703@smartelectronix.com> Message-ID: <8928d4e90703150649j4fceda80p3fd4cc4f21f1ea08@mail.gmail.com> Hey, I just noticed you're using Apache 2.0.52. This is definitely too old; as INSTALL.txt says, tramline only works with Apache 2.0.55 and later. Regards, Martijn