launchpad.branches.getByUrl() doesn't support properly urlencoded URLs

Bug #704606 reported by Jelmer Vernooij
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Triaged
Medium
Unassigned
Launchpad itself
Invalid
High
Unassigned
Ubuntu Distributed Development
Invalid
Undecided
Unassigned

Bug Description

launchpad.branches.getByUrl() in the API does not support URLs in which special characters such as "+" have been urlencoded.

e.g.:

(Pdb) print launchpad.branches.getByUrl(url="bzr+ssh://bazaar.launchpad.net/~jelmer/ubuntu/natty/paramiko/test")
https://api.launchpad.net/1.0/~jelmer/ubuntu/natty/paramiko/test

(Pdb) print launchpad.branches.getByUrl(url="bzr+ssh://bazaar.launchpad.net/~jelmer/ubuntu/natty/paramiko/randompool%2Baddressfamilies/")
None

(Pdb) print launchpad.branches.getByUrl(url="bzr+ssh://bazaar.launchpad.net/~jelmer/ubuntu/natty/paramiko/randompool+addressfamilies")
https://api.launchpad.net/1.0/~jelmer/ubuntu/natty/paramiko/randompool+addressfamilies

This breaks lp-propose, which uses the urlencoded URL.

Jelmer Vernooij (jelmer)
summary: - confusing error from lp-propose when a MP exists
+ lp-propose does not work against packaging branches
description: updated
Jelmer Vernooij (jelmer)
tags: added: udd
Jelmer Vernooij (jelmer)
summary: - lp-propose does not work against packaging branches
+ launchpad.branches.getByUrl() doesn't support properly urlencoded URLs
Changed in udd:
status: New → Invalid
description: updated
tags: removed: udd
tags: added: api
Changed in launchpad:
importance: Medium → High
Revision history for this message
Robert Collins (lifeless) wrote :

Per

      pchar = unreserved / pct-encoded / sub-delims / ":" / "@"

path element canonical form includes literal + - pct escaping them is incorrect and not canonical. The overview of the standard (std66) mentions that pct encoding where it is not needed will change the interpretation of urls, which is the case here.

Changed in launchpad:
status: Triaged → Invalid
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

In that case, bzr lp-propose shouldn't be submitting those URLs.

Changed in bzr:
status: New → Triaged
importance: Undecided → Medium
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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