Page MenuHomePhabricator

iOS app requests summaries with non-normalized titles
Closed, ResolvedPublic

Description

The iOS app is requesting the summaries from RESTBase with spaces instead of underscores, so it not only hits a lot of 301 redirects observing worse latency, it also doesn't share the cached summaries with other users.

See https://logstash.wikimedia.org/goto/825f98ebb50ece5ab2a7309e20fefa37

To normalize the titles we have a JS library mediawiki-title

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@JoeWalsh this is the performance ticket I mentioned at standup. Currently parked in eng sync on Goat release.

@Pchelolo somewhat related question:

For titles with a /, I'm getting a response with a title of Not found.

https://en.wikipedia.org/api/rest_v1/page/summary/McDonnell_Douglas_F/A-18_Hornet

However, the same title works on enwiki:

https://en.wikipedia.org/wiki/McDonnell_Douglas_F/A-18_Hornet

@JoeWalsh RESTBase uses / for routing, so all the titles in the request should be URI-encoded like encodeURIComponent(title). So the / becomes %2F

@Pchelolo this should be released to users next week

This is out. Please reopen if still an issue.