Page MenuHomePhabricator

🥦️ Handle `If-Unmodified-Since` header for get requests
Closed, ResolvedPublic

Description

  • Change OAS definition according to the "What we want" table (J18-J21)
  • Change the PreconditionCheck to trigger status code 2xx instead of 412 if the If-Unmodified-Since header condition is met

Event Timeline

(sorry, I meant to comment on a different task)

No need to change RequestPreconditionCheck, just need to override the checkPreconditions() method to return null in the RouteHandlers.

Change 836850 had a related patch set uploaded (by Ollie Shotton; author: Ollie Shotton):

[mediawiki/extensions/Wikibase@master] REST: Add If-Unmodified-Since header to GET requests

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

Change 836850 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Add If-Unmodified-Since header to GET requests

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