10 Jun
2003
10 Jun
'03
6:10 p.m.
Oliver Bleutgen wrote at 2003-6-10 14:54 +0200:
... (*) if m.find('/'): raise 'Redirect', ( "%s/%s" % (REQUEST['URL1'], m)) return getattr(self, m)(self, REQUEST)
My question is about the marked block. I'd guess that the intent is to send a redirect if m (== options[0]['action']) contains a '/'.
But m.find('/') evaluates to false only if m[0] == '/', otherwise it yields either -1 (which is true), if there's no '/' in m, or something greater 0, if there's a slash after the first char.
Is this intended behavior or a bug?
It probably a bug. But one, that usually only adds an unnecessary "redirect". Dieter