Apache Mod-Python - Re: mod_python.util.StorageField.read_to_boundary has problems in

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > November 2005 > Re: mod_python.util.StorageField.read_to_boundary has problems in





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: mod_python.util.StorageField.read_to_boundary has problems in
Jim Gallacher

2005-11-06, 8:47 pm

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.
>
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com