Lucas_Werkmeister_WMDE added a comment.
We currently generate HTTP 404 responses in `EntityDataRequestHandler` like
this:
$msg = wfMessage( 'wikibase-entitydata-bad-revision', $prefixedId,
$revision );
throw new HttpError( 404, $msg );
Adding custom headers here is going to be a bit annoying, because `HttpError`
doesn’t currently support custom response headers (but it uses the term
“header” to refer to the heading of the generated page, i.e. the `<title>` +
`<h1>` contents, so there’s some terminology confusion there), but apart from
that I don’t see why this shouldn’t be possible. We can probably add custom
header support to `HttpError` (it already emits a hard-coded Content-Type
header in `report()`, we could add the other headers there).
TASK DETAIL
https://phabricator.wikimedia.org/T289770
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, dcausse, Zbyszko, Addshore, Aklapper, Invadibot,
MPhamWMF, maantietaja, CBogen, Akuckartz, Nandana, Namenlos314, Lahi, Gq86,
GoranSMilovanovic, QZanden, EBjune, merbst, LawExplorer, _jensen, rosalieper,
Scott_WUaS, Jonas, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984,
Manybubbles, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]