<commit_before><?php
  if (!function_exists('getallheaders')) {
    function getallheaders() {
      $headers = '';
      foreach ($_SERVER as $name => $value) {
        if (substr($name, 0, 5) == 'HTTP_') {
          $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
        }
      }
      return $headers;
    }
  }

  $method = $_SERVER['REQUEST_METHOD'];
  $url = null;
  $data = null;
  $urlEncoded = false;

  // get data from the request
  if ($method == 'GET') {
    $data = $_GET;
  } else { // POST, PUT, DELETE
    $request_body = file_get_contents('php://input');
    $data = json_decode($request_body, true);
  }

  // get url to request
  $url = (isset($data['url']) && !empty($data['url'])) ? $data['url'] : null;

  if ($url != null) {<commit_msg>Updating getallheaders php function to get content-type and content-length form the request header.<commit_after><?php
  if (!function_exists('getallheaders')) {
    function getallheaders() {
      $headers = '';
      foreach ($_SERVER as $name => $value) {
        if (substr($name, 0, 5) == 'HTTP_') {
          $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
        }

        if ($name == 'CONTENT_TYPE') {
          $headers['Content-Type'] = $value;
        }

        if ($name == 'CONTENT_LENGTH') {
          $headers['Content-Length'] = $value;
        }
      }
      return $headers;
    }
  }

  $method = $_SERVER['REQUEST_METHOD'];
  $url = null;
  $data = null;
  $urlEncoded = false;

  // get data from the request
  if ($method == 'GET') {
    $data = $_GET;
  } else { // POST, PUT, DELETE
    $request_body = file_get_contents('php://input');
    $data = json_decode($request_body, true);
  }

  // get url to request
  $url = (isset($data['url']) && !empty($data['url'])) ? $data['url'] : null;

  if ($url != null) {
{'fraction_non_alphanumeric': 0.1978079331941545, 'fraction_numerical': 0.003131524008350731, 'mean_word_length': 2.7885375494071147, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1241985', 'n_tokens_mistral': 655, 'n_tokens_neox': 635, 'n_words': 146}