Merge lp:~bjornt/launchpad/bug-376990 into lp:launchpad/db-devel
Proposed by
Björn Tillenius
Status: | Merged |
---|---|
Approved by: | Brad Crittenden |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~bjornt/launchpad/bug-376990 |
Merge into: | lp:launchpad/db-devel |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~bjornt/launchpad/bug-376990 |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | mentor | Approve | |
Leonard Richardson (community) | Approve | ||
Review via email: mp+9320@code.launchpad.net |
To post a comment you must log in.
This branch makes canonical_url() produce browser URLs, even though the
current request is a web service request. We have some problems that API
URLs are used instead of browser URLs, for example in XHTML.
presentations and when e-mail notifications are generated inside API.
methods.
IMHO, canonical_url() should be split into two functions, but it's too.
late to do that now. I'd like one function that always returns a browser
URL, and one that returns either a browser or web service URL, depending
on which request is currently used. That's basically how I made.
canonical_url() work with this change. If no request is explicitly.
passed to it, a browser URL is always returned. In the case where you.
may want an API URL, you have to pass in the current request explicitly.
That's why I had to pass in the request to canonical_url() in the.
/people/foo rediretor, since it's used in both the app and web service
servers. Basically all code that redirects objects to canonical_url().
will need to pass in the request explicitly. At the moment all tests.
pass, but we might find a few bugs later. I don't expect this to be a.
big deal, though.
In this branch I also made canonical_url.txt run in FunctionalLayer, so
that it runs a bit faster.
BTW, I'm not going to land this branch before someone with more web.
service foo has commented on it, but I have discussed this approach with.
them already.