Server IP : 10.106.20.8  /  Your IP : 216.73.216.148
Web Server : Apache
System : Linux webm008.cluster106.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : sixiemesrc ( 611999)
PHP Version : 8.0.30
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/sixiemesrc/new/wp-content/languages/../plugins/query-monitor/output/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/sixiemesrc/new/wp-content/languages/../plugins/query-monitor/output/Headers.php
<?php declare(strict_types = 1);
/**
 * Abstract output class for HTTP headers.
 *
 * @package query-monitor
 */

abstract class QM_Output_Headers extends QM_Output {

	/**
	 * @return void
	 */
	public function output() {

		$id = $this->collector->id;

		foreach ( $this->get_output() as $key => $value ) {
			if ( ! is_scalar( $value ) ) {
				$value = json_encode( $value );
			}

			# Remove illegal characters (Header value may not contain NUL bytes)
			if ( is_string( $value ) ) {
				$value = str_replace( chr( 0 ), '', $value );
			}

			# Remove illegal characters (Header name may not contain underscores)
			$key = str_replace( '_', '-', $key );

			header( sprintf( 'X-QM-%s-%s: %s', $id, $key, $value ) );
		}

	}

}