API: Warn about POST without Content-Type
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 19 Aug 2019 16:45:56 +0000 (12:45 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 19 Aug 2019 17:00:37 +0000 (13:00 -0400)
commitbba1a0f2f92a722d60115c00f03244492eccfd30
tree94f4e473bd9461c7f429b264bee7cd829f12dd24
parentdb0c27a96534d81ef0432dcedeb7bc40ef7e6121
API: Warn about POST without Content-Type

HHVM sniffs the content type and so probably correctly guesses
application/x-www-form-urlencoded and fills in $_POST, while PHP 7 does
not sniff and so doesn't fill in $_POST.

Since there are clients that have been expecting the HHVM behavior, give
a warning both to let them know and so we can have some idea of how many
such clients there are.

This also adds any warnings and errors as an HTML comment at the top of
the auto-generated help page, to hopefully make it easier for people
getting that unexpectedly to find out why.

Bug: T230735
Change-Id: I017b7afe808844d74d376f6436894a5a2f525a9f
includes/api/ApiHelp.php
includes/api/ApiMain.php
includes/api/i18n/en.json
includes/api/i18n/qqq.json