Closed pmac closed 5 years ago
All I can guess is that something in the urlparse
and then urlunparse
steps is causing the extra slash to pop up. I don't see a reason it's necessary to parse the URL anyway since it's really just server + path + query params
.
Looks like the low-level request-making helper was unwisely modifying self.server_url
in-place; please take a look at https://github.com/mozilla/PyFxA/pull/74 which I suspect will fix the issue.
I cut a v0.7.2 release with the fix included.
I haven't yet been able to track down the exact circumstances but we ran into this issue in basket. Sometimes the URL returned by the
get_redirect_url()
method would look likehttps://oauth.stage.mozaws.net/v1//authorization?scope=profile...
and this would result in a 404 response. Seems to happen regardless of theserver_url
value. I was using the values forserver_url
straight from theconstants.py
file for theoauth
key. I'll update this if I figure anything else out. My solution for now is to build the URL myself in the basket code.