Page MenuHomePhabricator

Shortening only a domain without a trailing slash fails
Closed, DuplicatePublic

Description

Based on the demo at http://urlshortener.wmflabs.org/, trying to shorten just http://en.wikipedia.org does not work - a trailing slash is required.

I'm not sure whether this is meant to be supported, but maybe the regex (?) needs a change?

Event Timeline

polybuildr raised the priority of this task from to Needs Triage.
polybuildr updated the task description. (Show Details)
polybuildr added a subscriber: polybuildr.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 10 2015, 8:02 AM
Legoktm added subscribers: ori, Mholloway, Luke081515 and 24 others.

This is because new mw.Uri('https://en.wikipedia.org'); throws an exception: Error: Bad constructor arguments.

Jc86035 added a subscriber: Jc86035.EditedApr 11 2019, 4:40 PM

This actually works on meta.wikimedia.org, but an error is still generated and the URL is not normalized (see T220718).