Re: cwm bug

nice work; I'm reviewing the work, but it's hard for
me to think about it wihout seeing the test case.

Did you add a unit test to be sure we don't break this in the
future? I don't see one.


On Thu, 2003-04-03 at 16:08, Ryan Lee wrote:
> A while loop at line 194 increments a string index past the end of the
> shortest string (contrary to the comments) in the case where refTo(base,
> uri) is comparing uneven length strings.  If uri is shorter, then code
> like uri[i] on line 217 will complain about the index being out of bounds
> (whereas code using splicing like line 208 will just ignore the problem).
> Fixed by checking that i<len(uri) in line 217, which I think is correct:
> if base and uri match for the whole length of uri, then it will take some
> number of '../' to get to uri from base, with no other trailing
> characters (the else case).
> Passes tests, Python no longer barfs on what I run it on -
> checked in change.

Dan Connolly, W3C

Received on Thursday, 3 April 2003 17:17:30 UTC