| @@ -157,15 +157,17 @@ | ||
| 157 | 157 | * |
| 158 | 158 | * @return array{ttfb_ms:float,time_ms:float,bytes:int,bytes_transferred:int,status:int} |
| 159 | 159 | */ |
| 160 | 160 | private static function measure( string $url, bool $bypass ): array { |
| 161 | - $headers = array( | |
| 162 | - 'User-Agent' => 'xSpeed Benchmark/1.0', | |
| 163 | - // Ask for compression like a real browser so the WIRE size is | |
| 164 | - // measurable. Only encodings we can decode locally — no brotli | |
| 165 | - // (ext-brotli is rare, and an undecodable body would break the | |
| 166 | - // uncompressed measurement). | |
| 167 | - 'Accept-Encoding' => 'gzip, deflate', | |
| 161 | + $headers = Self_Traffic::headers( | |
| 162 | + array( | |
| 163 | + 'User-Agent' => 'xSpeed Benchmark/1.0', | |
| 164 | + // Ask for compression like a real browser so the WIRE size is | |
| 165 | + // measurable. Only encodings we can decode locally — no brotli | |
| 166 | + // (ext-brotli is rare, and an undecodable body would break the | |
| 167 | + // uncompressed measurement). | |
| 168 | + 'Accept-Encoding' => 'gzip, deflate', | |
| 169 | + ) | |
| 168 | 170 | ); |
| 169 | 171 | if ( $bypass ) { |
| 170 | 172 | // The X-XSpeed-Bypass header only short-circuits the PHP |
| 171 | 173 | // drop-in. When nginx static-rewrite is firing it would |