Page MenuHomePhabricator

🥦️ Handle conditional http headers in Wikibase REST API
Closed, ResolvedPublic8 Estimated Story Points

Description

Handle requests according to RFC 9110.
Cross check against https://docs.google.com/spreadsheets/d/1GzJAnv1g16ERDpLONmdFlkwsSIxc5Dw9w4xKCtUV_ho/edit#gid=20371120

Spec parameter descriptions

  • If-None-Match: Conditionally perform the request only if the resource has been modified since the specified entity revision numbers
  • If-Match: Conditionally perform the request only if the resource has not been modified since one of the specified entity revision numbers
  • If-Modified-Since: Conditionally perform the request only if the resource has been modified after the specified date
  • If-Unmodified-Since: Conditionally perform the request only if the resource has not been modified after the specified date

Note:

  • existing functionality is mostly correct except for the POST endpoint as seen in the spreadsheet
  • If-Match and If-Unmodified-Since on GET endpoints may also be incorrect
  • All combinations of conditional header and HTTP method to be covered in the specification and autodocs (i.e. even the less clear use cases)

Related Objects

Event Timeline

Jakob_WMDE set the point value for this task to 8.Sep 21 2022, 10:31 AM
Jakob_WMDE moved this task from Backlog to Next on the Wikibase Product Platform (v1) board.

Task Breakdown notes:

Silvan_WMDE renamed this task from Handle conditional http headers in Wikibase REST API to 🥦️ Handle conditional http headers in Wikibase REST API.Sep 27 2022, 2:04 PM

Change 837081 had a related patch set uploaded (by Jakob; author: Jakob):

[mediawiki/extensions/Wikibase@master] REST: Make header descriptions more generic

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

Change 837081 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Make header descriptions more generic

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