457: Review Board API not working when URL for RB is in sub directory

t**@alsop-fa******** (Google Code) (Is this you? Claim this profile.)
May 18, 2008
I am accessing RB via Apache, so my URL to access RB is
http://example.com:8000/reviewboard/

I am using the post-review script, but it is not able to connect to RB. I
get the following output:

[root@repo trunk]# /opt/reviewboard/contrib/tools/post-review
--server=http://repo.dev.local:8000/reviewboard -d
>>> Repository info 'Path: file://localhost/usr/local/svn/cstb, Base path:
/trunk, Supports changesets: False'
>>> Looking for 'repo.dev.local /reviewboard' cookie in
/root/.post-review-cookies.txt
>>> Couldn't load cookie file: [Errno 2] No such file or directory:
'/root/.post-review-cookies.txt'
==> Review Board Login Required
Enter username and password for Review Board at
http://repo.dev.local:8000/reviewboard
Username: talsop
Password:
>>> Logging in with username "talsop"
>>> HTTP POSTing to http://repo.dev.local:8000/api/json/accounts/login/:
{'username': 'talsop', 'password': '**************'}
>>> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /api/json/accounts/login/ was not found on this
server.</p>
<hr>
<address>Apache/2.2.3 (Red Hat) Server at repo.dev.local Port 8000</address>
</body></html>

Unable to access http://repo.dev.local:8000/api/json/accounts/login/. The
host path may be invalid
HTTP Error 404: Not Found
[root@repo trunk]#

I think it should be using
http://repo.dev.local:8000/reviewboard/api/json/accounts/login/. instead of
http://repo.dev.local:8000/api/json/accounts/login/.

Any ideas how I can fix this ?

Thanks,
Tim
#1 t**@alsop-fa******** (Google Code) (Is this you? Claim this profile.)
I edited the post-review script so that all references to /api/json were changed to
/reviewboard/api/json and this seems to work, but I wondered if there is a better
solution ? Perhaps the post-review script should be able to determine the correct URL
prefix from the --server paramater I have given ?
#2 jeroen.*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Any idea on progress of applying the reviewed patch (at
http://reviews.review-board.org/r/360/ )? 
david
#3 david
This should be fixed now.
  • +Fixed