includes internal port numbers in links

Bug #305995 reported by Jelmer Vernooij
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
loggerhead
Invalid
Undecided
Michael Hudson-Doyle
Debian
Fix Released
Unknown

Bug Description

from debian bug 507000:

Still on Alioth, I'm trying to get loggerhead running behind an Apache
proxy. I can get a list of branches at http://bzr.debian.org/loggerhead/
with an auto_publish_folder directive. Clicking on a branch name brings
me to http://bzr.debian.org/loggerhead/lolando/etch, which displays a
list of changes in that branch. But the links on that list of changes
point to http://bzr.debian.org:8080/loggerhead//lolando/etch/revision/28
with an explicit :8080 port corresponding to the one used internally by
loggerhead. This seems to apply to all links on that page, including the
ones to go back up one level.

Tags: alioth
Revision history for this message
masei (masei) wrote :

the same here, can someone tell me where I find the function in the code which creates the links. Should be easy to fix.

Revision history for this message
masei (masei) wrote :

O.K. found that this is kind of duplicate bug. See #45503 .
But in cause of the code change in branch.py the fix is a bit different:

in /usr/lib/python2.5/site-packages/loggerhead/apps/branch.py use

return "http://maseinet.de/repo/" + self._url_base + "/".join(args) + '?'' + qs

instead of

    return request.construct_url(
    self._environ, script_name=self._url_base,
    path_info='/'.join(args),
    querystring=qs)

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I'm pretty sure this isn't a bug of bug 45503, which is pretty old and not related to loggerhead but thunderbird. Perhaps you're missing a digit ?

Revision history for this message
masei (masei) wrote :

Oh sorry, that was QUESTION #45503, not a BUG.
Heading of the answer is: "Relative URLs behind Apache2 proxy possible? "
But its the same problem I think.

For me the fix is working now, its a little hack, but it solves the problem for now.

Revision history for this message
Martin Albisetti (beuno) wrote :

Does this apply to serve-branches as well?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Ah, I think I know now why I can't reproduce this: version skew with paste -- specifically whether you have this changeset or not: http://trac.pythonpaste.org/pythonpaste/changeset/6039. This seems to be in paste 1.2 though, which is pretty old.

Can you check the version you have? Is upgrading an option? I can probably work around this, but would rather not -- for one thing, testing my fix is going to be hard...

Revision history for this message
Sylvain Beucler (beuc) wrote :

(following up from #325505)

I upgraded python-paste to 1.6 (from backports.org).
At first, the --prefix was ignored.

Then I also upgraded python-pastedeploy to 1.3.1.
Now it looks like it works :)

Still, a main issue remains: why does loggerhead insist on producing full URLs (including host and ports) instead of host-less URLs?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

hm, that's a good question i guess. Here's some reasons/excuses:

 * it's not trivial to have path links, as you still need to take account of the prefix
 * it's seems to be the default approach in paste
 * you need to be able to generate full urls to be able to do redirects.

That said, I'd probably accept a patch that generated path urls.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Oh, and I'm glad loggerhead works for you now :)

I'm marking this as Invalid, which I think is appropriate given that the actual problems were in dependencies.

Changed in loggerhead:
status: New → Invalid
Revision history for this message
Sylvain Beucler (beuc) wrote :

Hmm,

> * it's not trivial to have path links, as you still need to take account of the prefix

Yes, but I'm talking about protocol+host+port, *not* absolute vs. relative urls.
e.g.: http://bzr.savannah.gnu.org/lh/gnash -> /lh/gnash

> * you need to be able to generate full urls to be able to do redirects.

Not in my experience.

> * it's seems to be the default approach in paste

I suggest you report this as a bug to paste then.

There is also have another bug: loggerhead needs to report incompatible versions of its dependencies - it would have saved time.

I'm taking the liberty to mark the bug back as 'confirmed' - hopefully this isn't against the customs :)

Changed in loggerhead:
status: Invalid → Confirmed
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I would rather open another bug or two, as the specific reported problem here is not a bug in loggerhead itself, and you're complaining about two things which are not going to be fixed at the same time.

I've filed https://bugs.edge.launchpad.net/loggerhead/+bug/327795 about version checking. I don't really care about the links thing, so you can file that bug if you do :)

Changed in loggerhead:
assignee: nobody → mwhudson
status: Confirmed → Invalid
Revision history for this message
Sylvain Beucler (beuc) wrote :

"reporting", not "complaining", thanks :)

Changed in debian:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.