<commit_before><?php

/**
 * HTTP TRANSPORT HANDLER
 * 
 * For use in RSS-PHP - Immitates a real browser and quickly retrieves/decodes remote resources
 * Fri Feb 08 21:00:31 GMT 2008
 *
 * @package RSS-PHP
 * @subpackage HTTP
 * @author <<EMAIL>>
 * @version 3
 */

class http_handler extends http_request {
	public $HTTPErrorMsg;
	private $rawHTTPResponse;
	private $activeRequest;
	private $requestExecutionArray;

	public function executeRequest() {
		$this->requestExecutionArray = &$this->HTTPRequestArray;
		foreach($this->requestExecutionArray as $HTTPRequestServer => $HTTPRequestURIArray) {
			foreach($HTTPRequestURIArray as $HTTPRequestURI => $HTTPRequestURIValues) {
				$this->formatHTTPHeaders();
				$this->activeRequest = &$this->HTTPRequestArray[$HTTPRequestServer][$HTTPRequestURI];
				$fp = @stream_socket_client($this->activeRequest['HTTPTransport'].$this->activeRequest['HTTPRequestServer'].':'.$this->activeRequest['HTTPPort'], $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $this->randomContext());
				if (!$fp) {
					if($errno == 0) {
						$this->HTTPErrorMsg = "http_handler could not connect to $this->activeRequest['HTTPRequestServer']:$this->activeRequest['HTTPPort']";
					} else {
						$this->HTTPErrorMsg = "http_handler could not connect to ".$this->activeRequest['HTTPRequestServer'].":".$this->activeRequest['HTTPPort']." (PHP Error Number: $errno, Message: $errstr)";
					}
					return false;
				} else {
					$this->activeRequest['rawHTTPResponse'] = '';
					fwrite($fp, $this->activeRequest['rawHTTPRequest']);
					while (!feof($fp)) {
						$this->activeRequest['rawHTTPResponse'] .= fgets($fp, 2);
					}
					fclose($fp);
					$this->parseResponse();
				}
			}
		}
		unset($this->activeRequest);
		unset($this->requestExecutionArray);
		unset($this->currentRequest);
		unset($this->validTransports);
		return true;<commit_msg>correct array to string conversion error<commit_after><?php

/**
 * HTTP TRANSPORT HANDLER
 * 
 * For use in RSS-PHP - Immitates a real browser and quickly retrieves/decodes remote resources
 * Fri Feb 08 21:00:31 GMT 2008
 *
 * @package RSS-PHP
 * @subpackage HTTP
 * @author <<EMAIL>>
 * @version 3
 */

class http_handler extends http_request {
	public $HTTPErrorMsg;
	private $rawHTTPResponse;
	private $activeRequest;
	private $requestExecutionArray;

	public function executeRequest() {
		$this->requestExecutionArray = &$this->HTTPRequestArray;
		foreach($this->requestExecutionArray as $HTTPRequestServer => $HTTPRequestURIArray) {
			foreach($HTTPRequestURIArray as $HTTPRequestURI => $HTTPRequestURIValues) {
				$this->formatHTTPHeaders();
				$this->activeRequest = &$this->HTTPRequestArray[$HTTPRequestServer][$HTTPRequestURI];
				$fp = @stream_socket_client($this->activeRequest['HTTPTransport'].$this->activeRequest['HTTPRequestServer'].':'.$this->activeRequest['HTTPPort'], $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $this->randomContext());
				if (!$fp) {
					if($errno == 0) {
						$this->HTTPErrorMsg = "http_handler could not connect to " . $this->activeRequest['HTTPRequestServer'] . ":" . $this->activeRequest['HTTPPort'];
					} else {
						$this->HTTPErrorMsg = "http_handler could not connect to " . $this->activeRequest['HTTPRequestServer'] . ":" . $this->activeRequest['HTTPPort'] . " (PHP Error Number: $errno, Message: $errstr)";
					}
					return false;
				} else {
					$this->activeRequest['rawHTTPResponse'] = '';
					fwrite($fp, $this->activeRequest['rawHTTPRequest']);
					while (!feof($fp)) {
						$this->activeRequest['rawHTTPResponse'] .= fgets($fp, 2);
					}
					fclose($fp);
					$this->parseResponse();
				}
			}
		}
		unset($this->activeRequest);
		unset($this->requestExecutionArray);
		unset($this->currentRequest);
		unset($this->validTransports);
		return true;
{'fraction_non_alphanumeric': 0.1577976817702845, 'fraction_numerical': 0.008956796628029505, 'mean_word_length': 4.7443267776096825, 'pattern_counts': {'":': 3, '<': 9, '<?xml version=': 0, '>': 59, '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': '5266745', 'n_tokens_mistral': 1347, 'n_tokens_neox': 1155, 'n_words': 226}