Page MenuHomePhabricator

Pages that are redirects give empty summary objects
Closed, ResolvedPublic

Description

http://0.0.0.0:6927/en.wikipedia.org/v1/page/summary/SZA%20(singer)

returns

{
"type": "standard",
"revision": "800581390"
}

"SZA (singer)" is a redirect to "Sza"

I understand RESTBase takes care of redirects, but it seems strange to respond like this. How should this be handled? Should it 404?

Other examples

  • Rooting (Android OS)
  • 2017 Formula One season
  • Doctor Strange (film)
  • June 2017 London attack

Related Objects

Event Timeline

To be clearer, yes redirects are out of scope and this shouldn't be happening but I'm curious why http://0.0.0.0:6927/en.wikipedia.org/v1/page/formatted-lead/SZA%20(singer) redirects but the summary endpoint doesn't as I thought we also removed redirects in the former suggesting this is not setup correctly.

@bearND @Pchelolo any ideas why this is happening?

To be clearer, yes redirects are out of scope and this shouldn't be happening but I'm curious why http://0.0.0.0:6927/en.wikipedia.org/v1/page/formatted-lead/SZA%20(singer) redirects but the summary endpoint doesn't as I thought we also removed redirects in the former suggesting this is not setup correctly.

@bearND @Pchelolo any ideas why this is happening?

So in general the agreement was that MCS never follows redirects or returns a 30x code, because RESTBase is handling all the redirect logic and if MCS starts redirecting too we can get caught in a redirect loop. So it's doesn't really matter at all what would MCS return for redirect pages - it could be 204 No Content for example, or even `403 Forbidden. I personally think 204 with empty body for ALL redirect content should be fine.

Change 380856 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/services/mobileapps@master] Redirects return 204 inside MCS

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

Change 380856 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Redirects return 204 inside MCS

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

Mentioned in SAL (#wikimedia-operations) [2017-10-03T22:26:53Z] <bsitzmann@tin> Finished deploy [mobileapps/deploy@82aa7d6]: Update mobileapps to 5dc0c02 (T175762 T177001 T176525 T176517 T176519) (duration: 06m 14s)

Jdlrobson claimed this task.