Alex Monk has uploaded a new change for review. https://gerrit.wikimedia.org/r/196514
Change subject: Don't try to access x-parsoid-performance on restbase cache hits ...................................................................... Don't try to access x-parsoid-performance on restbase cache hits It doesn't get set Currently causing this in prod: 6 Undefined index: x-parsoid-performance in /srv/mediawiki/php-1.25wmf21/extensions/VisualEditor/ApiVisualEditor.php on line 100 Change-Id: I6695ab0e7d461b7541dd56e392f8d1479998f2b5 (cherry picked from commit 28a293ebaf625deaab06223b6e5a8f7f59f69a31) --- M ApiVisualEditor.php 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/14/196514/1 diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index acd92ea..2ec1dae 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -94,9 +94,10 @@ // served directly from Varnish, in which case discard the value of the XPP header // and use it to declare the cache hit instead. $headers = $response['headers']; + $xpp = null; if ( isset( $headers['x-cache'] ) && strpos( $headers['x-cache'], 'hit' ) !== false ) { $xpp = 'cached-response=true'; - } else { + } elseif ( isset( $headers['x-parsoid-performance'] ) ) { $xpp = $headers['x-parsoid-performance']; } if ( $xpp !== null ) { -- To view, visit https://gerrit.wikimedia.org/r/196514 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6695ab0e7d461b7541dd56e392f8d1479998f2b5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: wmf/1.25wmf21 Gerrit-Owner: Alex Monk <kren...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits