I debugged this problem fairly extensively today.
I have set up ReviewBoard in Apache 2.2 as an IP'd VirtualHost on my
corporate intranet at http://codereview and can browse and use the
site w/ no known problems.

Segue to post-review, I use SVN and have set my reviewboard:url
property as follows:
svn propset reviewboard:url http://codereview .

When I post-review I keep having to authenticate because it turns out
the cookie is "bad".
The cookie is bad because it gets stored looking like this:
    # Netscape HTTP Cookie File
    # http://www.netscape.com/newsref/std/cookie_spec.html
    # This is a generated file!  Do not edit.

codereview.local        FALSE   /       FALSE   1289697551
rbsessionid     cd30a46f6fab9d3056242e28b133a596

post-review looks for the reviewboard:url property of "http://
codereview", parses it, and can't find "codereview" in the cookie.
Thus, it prompts me to authenticate again.

Looking at cookielib, my Apache server is not returning a domain name,
so there cookielib.py calls a method named "eff_request_host".
eff_request_host uses request.get_full_url(), which only returns
"codereview", and seeing no "." in the name it hard coded appends
".local" to the host name as erhn (aka: "effective request-host
cookielib uses the erhn of "codereview.local" and post-review uses the
non-erhn of "codereview".

A quick fix is to tell people to just "svn propset" the IP address of
the code review server, but I'd prefer to have them use the name.

It looks like a patch is needed in post-review and/or ReviewBoard:
1) post-review should call "req_host, erhn = cookielib.eff_request_host
(req)" and use "erhn"
2) ReviewBoard could reuse or add a setting that would be passed as a
"domain" attribute in a "Set-Cookie2" header

Without patching post-review or ReviewBoard, can anyone think of a way
to get Apache to send the "domain" attribute in the cookie?

Want to help the Review Board project? Donate today at 
Happy user? Let us know at http://www.reviewboard.org/users/
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to