And that's why I'm not that happy by using urljoin for those lines. I'm happy to do so for a final absolute URL but in those cases we only construct fragments. Also that parts are getting replaced if they don't correctly end in a slash is confusing. I would better do something like http://stackoverflow.com/a/11326230.