<commit_before><?php
$serverRoot = realpath(__DIR__ . '/../../../../../');

require_once($serverRoot . '/tests/lib/KalturaClient.php');
require_once($serverRoot . '/tests/lib/KalturaPlugins/KalturaEventNotificationClientPlugin.php');

if(!isset($_GET['type']))
{
	$message = "Handler type not defined";
	header("HTTP/1.1 500 Internal Server Error: $message");
	die($message);
}

$log = $serverRoot . '/cache/accept.log';
file_put_contents($log, "

***********************************************************************
Handler type: " . $_GET['type'] . "\n", FILE_APPEND);

switch($_GET['type'])
{
	case 'object':
		$object = unserialize($_POST['data']);
		file_put_contents($log, print_r($object, true), FILE_APPEND);
		break;
		
	case 'json':
		file_put_contents($log, print_r($_POST['data'], true), FILE_APPEND);
		break;
		
	case 'xml':
		file_put_contents($log, print_r($_POST['data'], true), FILE_APPEND);
		break;
		
	case 'fields':
		file_put_contents($log, print_r($_POST, true), FILE_APPEND);
		break;
		
	case 'text':
		$rawPostData = file_get_contents("php://input");
		file_put_contents($log, $rawPostData, FILE_APPEND);
		break;
}

echo 'OK';<commit_msg>Include http notification plugin instead of event notification<commit_after><?php
$serverRoot = realpath(__DIR__ . '/../../../../../');

require_once($serverRoot . '/tests/lib/KalturaClient.php');
require_once($serverRoot . '/tests/lib/KalturaPlugins/KalturaHttpNotificationClientPlugin.php');

if(!isset($_GET['type']))
{
	$message = "Handler type not defined";
	header("HTTP/1.1 500 Internal Server Error: $message");
	die($message);
}

$log = $serverRoot . '/cache/accept.log';
file_put_contents($log, "

***********************************************************************
Handler type: " . $_GET['type'] . "\n", FILE_APPEND);

switch($_GET['type'])
{
	case 'object':
		$object = unserialize($_POST['data']);
		file_put_contents($log, print_r($object, true), FILE_APPEND);
		break;
		
	case 'json':
		file_put_contents($log, print_r($_POST['data'], true), FILE_APPEND);
		break;
		
	case 'xml':
		file_put_contents($log, print_r($_POST['data'], true), FILE_APPEND);
		break;
		
	case 'fields':
		file_put_contents($log, print_r($_POST, true), FILE_APPEND);
		break;
		
	case 'text':
		$rawPostData = file_get_contents("php://input");
		file_put_contents($log, $rawPostData, FILE_APPEND);
		break;
}

echo 'OK';
{'fraction_non_alphanumeric': 0.24224643755238895, 'fraction_numerical': 0.004191114836546521, 'mean_word_length': 5.593922651933702, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6034685', 'n_tokens_mistral': 842, 'n_tokens_neox': 791, 'n_words': 146}