[spambayes-dev] Website bug and proposed fix

Mark Hammond mhammond at skippinet.com.au
Tue Nov 11 17:22:28 EST 2003


> Hi,
>
> Jens Rantil has kindly pointed out that we have some broken links on
> our website, in particular the "SF Project Page" link that appears
> throughout the site.
>
> I've never looked at the website stuff before so I could be way off
> base, but the problem seems to be that we're applying
> posixpath.normpath
> to a URL, with results that look like this:
>
> >>> import posixpath
> >>> posixpath.normpath("http://sourceforge.net/projects/spambayes")
> 'http:/sourceforge.net/projects/spambayes'
>
> I'd say the fix was to break apart the URL and only run the path
> component through normpath.  Here's a patch - I don't want to
> commit it,
> partly because I don't know the code, and partly because the website
> build system doesn't fully work on my machine so I can't
> thoroughly test
> it.

Mea culpa.  This was a hack I made when trying to get the
apps/outlook/bugs.html file working.  The code was breaking for me with
relative links, and I had the impression that the "link fixer" was only
fixing relative links.  I've checked your fix in (I still have a related
problem with bugs.html, but it exists before and after your patch.)

Mozilla appears to have done the right thing with those links!

> I've also removed a rather cryptic comment that seems to refer to
> history rather than the current state of play.

hehe - surely that comment helped you track the bug?  At least I put my name
next to my suspect code ;)

Mark.




More information about the spambayes-dev mailing list