branch redirect points to internal id url

Bug #340354 reported by Martin Pool on 2009-03-10
Affects Status Importance Assigned to Milestone
Launchpad itself

Bug Description

mbp@lithe% curl -v
* About to connect() to port 80 (#0)
* Trying connected
* Connected to ( port 80 (#0)
> GET /~mbp/bzr/progress/.bzr/branch/lock HTTP/1.1
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/ libidn/1.10
> Host:
> Accept: */*
< HTTP/1.1 301 Moved Permanently
< Date: Tue, 10 Mar 2009 07:13:25 GMT
< Server: Apache/2.2.8 (Ubuntu) mod_ssl/2.2.8 OpenSSL/0.9.8g
< Location:
< Content-Length: 379
< Content-Type: text/html; charset=iso-8859-1
< Via: 1.1
<title>301 Moved Permanently</title>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="">here</a>.</p>
<address>Apache/2.2.8 (Ubuntu) mod_ssl/2.2.8 OpenSSL/0.9.8g Server at Port 80</address>
* Connection #0 to host left intact
* Closing connection #0

Paul Hummer (rockstar) wrote :

jml and/or mwhudson, can either of you comment on the severity of this bug?

I don't think it's very urgent as I only hit it when debugging something else.

On 3/11/09, Paul Hummer <email address hidden> wrote:
> jml and/or mwhudson, can either of you comment on the severity of this
> bug?
> --
> branch redirect points to internal id url
> You received this bug notification because you are a direct subscriber
> of the bug.

Martin <>

Jonathan Lange (jml) wrote :

Except that I would have said this was impossible.

Changed in launchpad-bazaar:
importance: Undecided → Medium
status: New → Triaged
Martin Pool (mbp) wrote :

I just hit this again, also while debugging something else

In [7]: t.has('.bzr')
RedirectRequested Traceback (most recent call last)

/home/mbp/bzr/doc/<ipython console> in <module>()

/home/mbp/bzr/doc/bzrlib/transport/http/ in has(self, relpath)
    155 """Does the target location exist?
    156 """
--> 157 response = self._head(relpath)
    159 code = response.code

/home/mbp/bzr/doc/bzrlib/transport/http/ in _head(self, relpath)
    148 request = Request('HEAD', abspath,
    149 accepted_errors=[200, 404])
--> 150 response = self._perform(request)
    152 return response

/home/mbp/bzr/doc/bzrlib/transport/http/ in _perform(self, request)
     92 raise errors.RedirectRequested(request.get_full_url(),
     93 request.redirected_to,
---> 94 is_permanent=(code == 301))
     96 if request.redirected_to is not None:

RedirectRequested: is permanently redirected to

In [8]: t
Out[8]: <bzrlib.transport.http._urllib.HttpTransport_urllib url=>

This seems to be with Apache's builtin behaviour that if foo is a directory and you ask for '/foo' you immediately get a redirect to '/foo/', and that's interacting somehow with the redirect map.

It's a bit bad that Launchpad gives out redirects to URLs which are then not accepted. (They're not actually 404; they give you a redirection back to the home page which is in some ways more confusing.)

Changed in launchpad:
importance: Medium → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers