HTTP frontend does not treat ~ and %7E as equivalent

Bug #1672697 reported by Colin Watson on 2017-03-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
turnip
Undecided
Unassigned

Bug Description

Per RFC 2616, these two URLs should be equivalent:

  https://git.launchpad.net/~canonical-launchpad-branches/launchpad/+git/launchpad/commit/?id=46890eefce95d00525ae12a1158199cca07898b6
  https://git.launchpad.net/%7Ecanonical-launchpad-branches/launchpad/+git/launchpad/commit/?id=46890eefce95d00525ae12a1158199cca07898b6

However, the former returns 200 while the latter returns 302 (if unauthenticated) or 404 (if authenticated). I'm not currently sure exactly why this is happening; something in the depths of twisted.web?

I noticed this while filing https://github.com/juju/charm-tools/issues/312, because GitHub apparently encodes "~" to "%7E" in user-generated content.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers