<commit_before><?php
namespace mharj;

class HttpResponse {
  private $headers = array();
  private $status = 200;
  
  /**
   *  Add value end of array or create new one if not existing
   */
  public function addHeader(string $name, string $value) {
    if (! isset($this->headers[$name]) ) {
      $this->headers[$name]=array($value);
    } else {
      $this->headers[$name][]=$value;
    }
  }
  
  /**
   * Set value and override all existing ones in array
   */
  public function setHeader(string $name, string $value) {
    $this->headers[$name]=array($value);
  }  
  
  public function getHeaderNames(): array {
    return array_keys($this->headers);
  }
  
  public function getHeader(string $name) {
    if ( isset($this->headers[$name]) ) {
      return $this->headers[$name];
    }
    return null;
  }
  public function setStatus(int $status) {
    $this->status = $status;
  }
  public function getStatus(): int {
    return $this->status;
  }
}<commit_msg>Cleanup + initial raw mode support<commit_after><?php
namespace mharj;

class HttpResponse {
	private $headers = array();
	private $status = 200;
	private $is_raw = false;  
  
	/**
	 *  Add value end of array or create new one if not existing
	 */
	public function addHeader(string $name, string $value) {
		if (! isset($this->headers[$name]) ) {
			$this->headers[$name]=array($value);
		} else {
			$this->headers[$name][]=$value;
		}
	}
  
	/**
	 * Set value and override all existing ones in array
	 */
	public function setHeader(string $name, string $value) {
		$this->headers[$name]=array($value);
	}
  
	public function getHeaderNames(): array {
		return array_keys($this->headers);
	}
  
	public function getHeader(string $name) {
		if ( isset($this->headers[$name]) ) {
			return $this->headers[$name];
		}
		return null;
	}
	public function setStatus(int $status) {
		$this->status = $status;
	}
	public function getStatus(): int {
		return $this->status;
	}
	
	public function setRaw(bool $raw) {
		$this->is_raw = $raw;
	}
	
	public function isRaw(): bool {
		return $this->is_raw;
	}	
}
{'fraction_non_alphanumeric': 0.15243608297153882, 'fraction_numerical': 0.002894356005788712, 'mean_word_length': 3.357142857142857, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '312580', 'n_tokens_mistral': 701, 'n_tokens_neox': 673, 'n_words': 175}