Page MenuHomePhabricator

Add support for unencoded Unicode URLs
Closed, ResolvedPublic3 Estimated Story Points

Description

URLs in encoded form can be used for import:
https://ar.wikipedia.org/wiki/%D9%85%D9%84%D9%81:1967%2BTUN.jpg
https://ar.wikipedia.org/wiki/%D9%85%D9%84%D9%81:UD_%D9%84%D9%88%D8%BA%D8%B1%D9%8A%D9%86%D9%8A%D9%8A%D8%B3.png

Unencoded URLs can't:
https://ar.wikipedia.org/wiki/ملف:1967+TUN.jpg
https://ar.wikipedia.org/wiki/File:UD لوغرينييس.png

Failed to discover API location from: "https://ar.wikipedia.org/wiki/File:UD لوغرينييس.png". Status code 200,

Technically this is a missing feature, but from the users perspective (these users are used to unencoded URLs working) it's a bug.

Acceptance criteria:

Event Timeline

Sounds a bit like what I got with curl and where I added this patch

https://gerrit.wikimedia.org/r/#/c/436224/

If you look at the code around there you also will know why that comma. We should look at it when we schedule the ticket.

@Bmueller, can you add what you know about the original bug report as provided by the user? I'm looking for the filename. Does it contain spaces or underscores? If it does, then this is not about Unicode support, but about spaces.

Change 437435 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Normalize spaces in Wikimedia source URLs

https://gerrit.wikimedia.org/r/437435

Tobi_WMDE_SW set the point value for this task to 3.Jun 5 2018, 12:38 PM
Tobi_WMDE_SW subscribed.

Include fixing of error handling.

Change 437478 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Fix incomplete error reporting in HttpApiLookup

https://gerrit.wikimedia.org/r/437478

Change 437506 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Provide non-empty plain text message in HttpRequestException

https://gerrit.wikimedia.org/r/437506

Change 437478 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Fix incomplete error reporting in HttpApiLookup

https://gerrit.wikimedia.org/r/437478

@thiemowmde, this is the originial bug report: "When I click EditFileInfo or Info button, I get an error 200."

Screenshot:

Bugreport screenshot.png (425×1 px, 55 KB)

Change 437729 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/FileImporter@master] Allow plus characters in source URLs

https://gerrit.wikimedia.org/r/437729

Change 437506 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Provide non-empty plain text message in HttpRequestException

https://gerrit.wikimedia.org/r/437506

Change 437729 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Allow plus characters in source URLs

https://gerrit.wikimedia.org/r/437729

Change 437435 merged by jenkins-bot:
[mediawiki/extensions/FileImporter@master] Normalize spaces in Wikimedia source URLs

https://gerrit.wikimedia.org/r/437435

Can be tested with

https://test.wikimedia.beta.wmflabs.org/wiki/Special:ImportFile?clientUrl=https://ar.wikipedia.org/wiki/File:UD لوغرينييس.png

( or any other file url you put behind the clientUrl= )

Vvjjkkii renamed this task from Add support for unencoded Unicode URLs to eubaaaaaaa.Jul 1 2018, 1:06 AM
Vvjjkkii removed thiemowmde as the assignee of this task.
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
Vvjjkkii removed a subscriber: gerritbot.
CommunityTechBot renamed this task from eubaaaaaaa to Add support for unencoded Unicode URLs.Jul 2 2018, 1:45 PM
CommunityTechBot assigned this task to thiemowmde.
CommunityTechBot lowered the priority of this task from High to Medium.
CommunityTechBot set the point value for this task to 3.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: gerritbot.