1 parent
b0584dea0a
commit
f62eff890a
2 files changed
+6
-1
No files matched your search
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
### Fixed
|
||||
- Mustache.php version to resolve issues on PHP 7.4
|
||||
- type crash when URL passed to network request filters is invalid
|
||||
- large server timing headers breaking proxies
|
||||
|
||||
## 3.3.1 - 2019-07-02
|
||||
|
||||
|
||||
@@ -57,11 +57,15 @@ class Server_Timing_Manager {
|
||||
foreach ( $this->collector->get_records() as $record ) {
|
||||
$duration = $record->get_duration() * 1000;
|
||||
|
||||
if ( $duration < 1 ) {
|
||||
if ( $duration < 1 ) { // Filter out less than 1ms events as too noisy.
|
||||
continue;
|
||||
}
|
||||
|
||||
$header .= sprintf( '%s;dur=%.2f;desc="%s", ', $record->get_category(), $duration, $record->get_name() );
|
||||
|
||||
if ( strlen( $header ) > 4000 ) { // 8+KB headers break proxies, so we cut off at 1/2 that limit.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
header( 'Server-Timing: ' . preg_replace( '/\R/', '', $header ) );
|
||||
|
||||
Reference in new issue
Block a user