'Build a URL relative to the server base_url, with the given
query parameters added.'

def build_url(self, request, action, **query):

    base = urlparse.urljoin(request['base_url'], ((self.auth_prefix + '/') + action))
    return appendArgs(base, query)
