Addshore added a comment.

Well, as mentioned in T204267#4865669, we’re currently looking for Retry-After, case-sensitive. And if I remember correctly, nginx usually sends headers in all lowercase. So unless MediaWiki’s MWHttpRequest::getResponseHeaders normalizes retry-after back into Retry-After, we won’t find the header.

That isn't the issue here, the client still does not get the header.

This can be seen in the logs on T204267#4887839 which is reported by https://github.com/wikimedia/mediawiki-extensions-WikibaseQualityConstraints/blob/1ef719f5891a616450e4fc21cfd49527a456b7d1/src/ConstraintCheck/Helper/LoggingHelper.php#L298 and dumps all of the headers into the log.

{"responseHeaders":"{\"server\":[\"nginx\\/1.13.6\"],\"date\":[\"Tue, 15 Jan 2019 15:27:10 GMT\"],\"content-type\":[\"application\\/octet-stream\"],\"connection\":[\"close\"],\"cache-control\":[\"no-cache\"]}"

Also getResponseHeaders and getResponseHeader do normalization of the header using the parseHeader method.
So we should actually only ever be looking for lowercase (I'll add this to code review)


TASK DETAIL
https://phabricator.wikimedia.org/T214032

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Addshore
Cc: gerritbot, Lucas_Werkmeister_WMDE, Smalyshev, Aklapper, Addshore, CucyNoiD, Nandana, NebulousIris, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, EBjune, merbst, LawExplorer, Lewizho99, Maathavan, _jensen, Jonas, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to