Skip to content

Conversation

@westonruter
Copy link
Member

This is a sub-PR of #1317. Merge it first.

As @felixarntz pointed out in #1317 (comment), when a template calls ob_clean() it can currently result in the Server-Timing header being sent prematurely. When the buffer is being cleaned, the output buffer callback should not send the header yet because no output is being printed, so it can continue waiting until the output is flushed.

This also fixes a bug with passing the argument names when they are missing from the $args passed to \Perflab_Server_Timing::register_metric(). The PR also improves escaping the resultant strings.

@westonruter westonruter added [Type] Bug An existing feature is broken [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only labels Aug 6, 2024
@westonruter westonruter added this to the performance-lab n.e.x.t milestone Aug 6, 2024
@github-actions
Copy link

github-actions bot commented Aug 6, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: westonruter <westonruter@git.wordpress.org>
Co-authored-by: felixarntz <flixos90@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @westonruter!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Type] Bug An existing feature is broken

Projects

Status: Done 😃

Development

Successfully merging this pull request may close these issues.

3 participants