HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/locationdebateau/wp-content/plugins/wp-seopress/src/ManualHooks/ApiHeader.php
<?php // phpcs:ignore

namespace SEOPress\ManualHooks;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * ApiHeader
 */
class ApiHeader {

	/**
	 * The ApiHeader hooks.
	 *
	 * @since 4.4.0
	 *
	 * @return void
	 */
	public function hooks() {
		add_filter( 'http_request_args', array( $this, 'addHeaderRequest' ) );
	}

	/**
	 * The ApiHeader add header request.
	 *
	 * @since 4.4.0
	 *
	 * @param array $arguments The arguments.
	 *
	 * @return array
	 */
	public function addHeaderRequest( $arguments ) { // phpcs:ignore -- TODO: check if method is outside this class before renaming.
		$body = $arguments['body'];

		if ( is_array( $body ) ) {
			$body = implode( '', $body );
		}

		$arguments['headers']['expect'] = ! empty( $body ) && strlen( $body ) > 1048576 ? '100-Continue' : '';

		return $arguments;
	}
}