Get rid of the no-trailing-slash restriction on branch URIs

Bug #328588 reported by Leonard Richardson
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

There seems to be no current reason why a branch URI should not be able to end in a slash (http://foo.com/bar/), especially if the slash is the entire path (http://foo.com/). I've written code that normalizes the handling of slashes in URI fields, but it uses our URI class, which treats "http://foo.com/" as a URL that doesn't need to have its trailing slash removed. I think that's the correct behavior, but setting a branch URI to "http://foo.com/" violates a database constraint.

This bug is to get rid of that database constraint, and to get rid of the special behavior I've put in BranchURIField to chop off the slash at the end of "http://foo.com/".

The branch that introduces the URIField slash normalization is
https://code.edge.launchpad.net/~leonardr/launchpad/representation-on-patch. I'll land it with XXX directives that reference this bug.

Revision history for this message
Celso Providelo (cprov) wrote :

The DB constraint in question is: "branch_url_no_trailing_slash" CHECK (url !~~ '%/'::text)

What's the rationale behind it ?

Revision history for this message
Jonathan Lange (jml) wrote :

None of us have a clue what the rationale is / was.

Changed in launchpad-bazaar:
importance: Undecided → Low
status: New → Triaged
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.