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

New issue 796 by butchland: post-review tool doesn't create a review if  
reviewboard was installed on a url that is not root at '/', e.g. '/reviews'
http://code.google.com/p/reviewboard/issues/detail?id=796

The post-review tool assumes that the reviewboard url is always at '/' e.g.
'http://reviews.example.com/'. If reviewboard was installed with a url like
'http://www.example.com/reviews/', the post-review tool cannot submit a new
  review.

What steps will reproduce the problem?

1. Install reviewboard on a url that is not at the root of the site:
In my case I installed it using the following modpython configuration:

         # Error handlers
         ErrorDocument 500 /errordocs/500.html

         # Serve django pages
         <Location "/reviewboard">
                 PythonPath "['/srv/reviewboard/conf'] + sys.path"
                 SetEnv DJANGO_SETTINGS_MODULE reviewboard.settings
                 SetHandler mod_python
                 PythonHandler django.core.handlers.modpython
                 PythonAutoReload Off
                 PythonDebug Off
                 # Used to run multiple mod_python sites in the same apache
                 PythonInterpreter reviewboard_reviewboard
         </Location>

         # Serve static media without running it through mod_python
         # (overrides the above)
         <Location "/media">
                 SetHandler None
         </Location>
         <Location "/errordocs">
                 SetHandler None
         </Location>

         # Alias static media requests to filesystem
         Alias /media /srv/reviewboard/htdocs/media
         Alias /errordocs /srv/reviewboard/htdocs/errordocs

2. Complete the reviewboard installation and configuration (including
simplejson on the client)

3. Try to submit a review using post-review with option

     '--server=http://www.example.com/reviewboard'

where http://www.example.com/reviewboard is the url of your reviewboard  
site.

What is the expected output? What do you see instead?

It should have created a new draft review request. Instead it returns a 404
error message like the following:

'Unable to access http://www.example.com/api/json/repositories/ (404). The
host path may be invalid'


What operating system are you using? What browser?

This is on both Linux and windows. Browser is not relevant as I am using a
commandline tool.

Please provide any additional information below.

The error is due to the fact that its trying to look up
'http://www.example.com/api/json/repositories' when it
should be looking up
'http://www.example.com/reviewboard/api/json/repositories'

I created a fix for it and have submitted for review.


--
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