Fixed headers error from new line in Server Timing.

Fixes #28
This commit is contained in:
Andrey Savchenko committed 2019-01-22 15:12:21 +02:00
1 parent c1a389dc17
commit ad246ad1bc
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## Unreleased
### Fixed
- headers error from new line in Server Timing
## 3.0.1 - 2019-01-09
### Fixed
+1 -1
View File
@@ -64,7 +64,7 @@ class Server_Timing_Manager {
$header .= sprintf( '%s;dur=%.2f;desc="%s", ', $record->get_category(), $duration, $record->get_name() );
}
header( 'Server-Timing: ' . $header );
header( 'Server-Timing: ' . preg_replace( '/\R/', '', $header ) );
return $input;
}