Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 930 by mac...@neatco.com: Error building URL in the  
function '_make_url' in post-review.py
http://code.google.com/p/reviewboard/issues/detail?id=930

What's the URL of the page containing the problem?
post-review function _make_url(self, path): has been failing for me in the
case where:

a) self.url = 'internal.server.local:1234/'
b) path = api/json/reviewrequests/ or path = '/api/json/reviewrequests/'

this is due to app = ' ' caused by
app = urlparse(self.url)[2]

I suggest the following changes:
a) change the '/' removal to be as follows (more intuitive)
  if path[0] == '/':
     path = path[1:]
b) chance else/if case to be
if(app == None or app == ''):
     url = urljoin(self.url, path)
else:
    url = urljoin(self.url, urljoin(app,path) )


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to reviewboard-issues@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to