11-07-05 01:47 AM
I've been spending some quality time with hexedit, vim and a little bit
of python. I can now generate a file which can be used in the unit test.
The problem seems to occur when a '\r' character is right at
readBlockSize boundary, which is 65368 in the current mod_python.util.
I have not yet tested Alexis's fix yet. It's possible that it doesn't
fix the problem but is just masking it since his code uses a
readBlockSize of 65536, which will not be a problem for ugh.pdf.
The attached script will generate a file that can be used for testing. I
haven't tried to integrate it into Nicolas's unit test as I wanted to
share my findings with everyone asap. I'll spend some more time on this
tommorrow.
Happy Bug Hunting,
Jim
Nicolas Lehuen wrote:
> Hi guys,
>
> In the pure "if it ain't tested, it ain't fixed" fashion, I've added a
> unit test for file upload to the test suite. It uploads a randomly
> generated 1 MB file to the server, and check that the MD5 digest
> returned by the server is correct. I could not reproduce Alexis' bug
> report this way, however. But I then I added a test with the UNIX-HATERS
> handbook file ugh.pdf, and bang, here comes the bug.
>
> I've checked in both unit tests into subversion, so that you can play
> with them. I'm now going to test Alexis' fix.
>
>
[ Post a follow-up to this message ]
|