@@ -85,7 +85,7 @@
if request is None:
- raise cherrypy.HTTPRedirect(self.basepath)
+ raise cherrypy.HTTPRedirect(self.basepath or '/')
If there is no request, we redirect to self.basepath, but if Ipsilon is mounted
to the root (/), basepath is set to None.
Sending a HTTPRedirect(None) redirects back to the current page.
So this change makes OpenID send the user to / in this case.
Signed-off-by: Patrick Uiterwijk firstname.lastname@example.org
I decided to use the "or '/'" method for now.
Refactoring everything to use the posixpath.join method is a bigger change, and not needed for this.
This change is fine with me so you have an LGTM, but I would also suggest that another good change would be to consider making it "illegal" for basepath to be None so that this problem just doesn't happen. I think it's good to enforce data rules like this so all of your code can be cleaner and assume that basepath isn't None.
That's just a suggestion, so if you want to go this route instead, that's fine ☺
The problem is that due to stuff inside cherrypy, we need to allow base.mount to be unset to get stuff on the web root :).
Pull-Request has been merged by puiterwijk