protected function parsevars(array $s)
	{
		$this->method      = strtoupper($this->arrayGet('REQUEST_METHOD', $s));
		$this->host        = $this->arrayGet('HTTP_HOST', $s);
		$this->user_agent  = $this->arrayGet('HTTP_USER_AGENT', $s, false, false);
		$this->accept      = $this->arrayGet('HTTP_ACCEPT', $s, true);
		$this->languages   = $this->arrayGet('HTTP_ACCEPT_LANGUAGE', $s, true);
		$this->encodings   = $this->arrayGet('HTTP_ACCEPT_ENCODING', $s, true);
		$this->connection  = $this->arrayGet('HTTP_CONNECTION', $s);
		$this->referer     = $this->arrayGet('HTTP_REFERER', $s);
		$this->path        = $this->arrayGet('PATH', $s);
		$this->software    = $this->arrayGet('SERVER_SOFTWARE', $s);
		$this->name        = $this->arrayGet('SERVER_NAME', $s);
		$this->address     = $this->arrayGet('SERVER_ADDR', $s);
		$this->port        = $this->arrayGet('SERVER_PORT', $s);
		$this->remote_addr = $this->arrayGet('REMOTE_ADDR', $s);
		$this->remote_port = $this->arrayGet('REMOTE_PORT', $s);
		$this->admin       = $this->arrayGet('SERVER_ADMIN', $s);
		$this->filename    = $this->arrayGet('SCRIPT_FILENAME', $s);
		$this->scriptname  = $this->arrayGet('SCRIPT_NAME', $s);
		$this->uri         = $this->arrayGet('REQUEST_URI', $s);
		$this->time        = $this->arrayGet('REQUEST_TIME', $s);

        if($this->arrayGet('HTTPS', $s) || strtolower($this->arrayGet('HTTP_X_FORWARDED_PROTO', $s)) == 'https') {
            $this->protocol = 'https';
        } else {
            $this->protocol = 'http';
        }

		// Stripping GET and anchor from the URI.
		$this->route = $this->uri;
		$get_id = strpos($this->route, '?');
		if($get_id !== false) {
			$this->route = substr($this->route, 0, $get_id);
		}
		$anchor_id = strpos($this->route, '#');
		if($anchor_id !== false) {
			$this->route = substr($this->route, 0, $anchor_id);
		}
	}