REST: Properly handle HEAD requests
authorTim Starling <tstarling@wikimedia.org>
Tue, 10 Sep 2019 06:26:53 +0000 (16:26 +1000)
committerTim Starling <tstarling@wikimedia.org>
Tue, 17 Sep 2019 06:03:14 +0000 (16:03 +1000)
commit9911a3605019806e972a26f5d19cf9ac8c16c401
treef79b96d83b92e60036a53f27fd47c78a93dce82e
parent8b1a6cc58af722aff053c8b30948ae751e6d7f29
REST: Properly handle HEAD requests

Just handle a HEAD request as a GET request, if no specific HEAD handler
exists. This is simple and similar to what the rest of MediaWiki does in
response to a HEAD request.

Bug: T226043
Change-Id: I7b2bd657c20b56844459874131a3d85fabe7db3d
includes/Rest/Router.php
tests/phpunit/unit/includes/Rest/RouterTest.php