[Zope-Coders] range-related tests fail in OFS

Martijn Pieters mj@zope.com
Fri, 5 Oct 2001 17:07:41 -0400


On Tue, Oct 02, 2001 at 03:37:25PM -0400, Jeremy Hylton wrote:
> The testRanges module in OFS has three test failures.  I can't tell
> who owns this code.  It looks like some simple off-by-one errors, but
> it isn't obvious if the tests or the code is broken.  Ought to be
> fixed either way.

This problem is related to changes in the MultiFile module, see #417176 on
SourceForge:

  http://sourceforge.net/tracker/?func=detail&aid=417176&group_id=5470&atid=105470

In 2.1 (and before) MultiFile would parse a multi-part mime construct and
return the different parts contained therein with the CRLF that's actually
part of the mime bounderies with the contained data. The test suite using
MutiFile to test the range code compensated for this by removing the CRLF
itself.

Now MultiFile will remove only a newline, while the range code (correctly)
generates boundaries with \r\n, and MultiFile ends up returning the parts
with an additional \r, and the tests fail because of that extra character.

-- 
Martijn Pieters
| Software Engineer  mailto:mj@zope.com
| Zope Corporation   http://www.zope.com/
| Creators of Zope   http://www.zope.org/
---------------------------------------------