jenkins-bot has submitted this change and it was merged. 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 Change-Id: I6695ab0e7d461b7541dd56e392f8d1479998f2b5 --- M ApiVisualEditor.php 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jforrester: Looks good to me, approved GWicke: Looks good to me, approved jenkins-bot: Verified 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/196503 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6695ab0e7d461b7541dd56e392f8d1479998f2b5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Alex Monk <kren...@gmail.com> Gerrit-Reviewer: GWicke <gwi...@wikimedia.org> Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits