<commit_before><?php

// build request URL from remaining path stack
$path = '/' . implode('/', $_EVENT['request']->getPathStack());


// pass query string through as-is
$query = $_SERVER['QUERY_STRING'];


// strip gatekeeper key from query
$query = preg_replace('/(^|&)gatekeeperKey=[a-zA-Z0-9]+(&|$)/', '$2', $query);


// save URL to request object
$_EVENT['request']->setUrl(rtrim($path . '?' . $query, '?&'));<commit_msg>trim leading query delimiters<commit_after><?php

// build request URL from remaining path stack
$path = '/' . implode('/', $_EVENT['request']->getPathStack());


// pass query string through as-is
$query = $_SERVER['QUERY_STRING'];


// strip gatekeeper key from query
$query = preg_replace('/(^|&)gatekeeperKey=[a-zA-Z0-9]+(&|$)/', '$2', $query);


// save URL to request object
$_EVENT['request']->setUrl(rtrim($path . '?' . ltrim($query, '?&'), '?&'));
{'fraction_non_alphanumeric': 0.23442808607021517, 'fraction_numerical': 0.006795016987542469, 'mean_word_length': 4.777777777777778, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '2279563', 'n_tokens_mistral': 302, 'n_tokens_neox': 293, 'n_words': 71}