Page MenuHomePhabricator

Etag is not returned for mobile-sections-lead or mobile-sections-remaining if a revision parameter is present
Closed, ResolvedPublic

Description

An etag should be always be returned for the mobile-sections-lead and mobile-sections-remaining endpoints, but isn't if a revision param is specified.

wmf1256:restbase mholloway$ curl -I https://en.wikipedia.org/api/rest_v1/page/mobile-sections-lead/Michelle_Obama/812625532 | grep etag
access-control-expose-headers: etag
wmf1256:restbase mholloway$ curl -I https://en.wikipedia.org/api/rest_v1/page/mobile-sections-remaining/Michelle_Obama/812625532 | grep etag
access-control-expose-headers: etag

Note that an etag is provided for mobile-sections, even with a revision parameter:

wmf1256:restbase mholloway$ curl -I https://en.wikipedia.org/api/rest_v1/page/mobile-sections/Michelle_Obama/812625532 | grep etag
access-control-expose-headers: etag
etag: W/"812625532/c0bd8696-0c21-11e8-854e-235c1f20c0cf"

And that an etag is provided for mobile-sections-lead or mobile-sections-remaining if no revision param is specified:

wmf1256:restbase mholloway$ curl -I https://en.wikipedia.org/api/rest_v1/page/mobile-sections-remaining/Michelle_Obama | grep etag
access-control-expose-headers: etag
etag: W/"823271950/819cbb9f-0c1e-11e8-a191-37fae0be3cea"

Note: MCS provides etag headers for all of these endpoints in all cases.