private function parseHeaders()
    {
        $this->headers = [];

        // NB: We cannot use getallheaders() as it is Apache only, so we have to roll our own implementation.

        foreach ($this->environment as $key => $value) {
            if (!empty($value) && substr($key, 0, 5) == 'HTTP_') {
                $headerName = substr($key, 5); // Remove HTTP_ prefix from the name
                $headerName = str_replace('_', ' ', $headerName); // Swap underscores with space so we can use ucwords()
                $headerName = ucwords(strtolower($headerName)); // Convert casing to the standard notation (Bla-Bla)
                $headerName = str_replace(' ', '-', $headerName); // Swap spaces back for dashes

                $this->headers[$headerName] = $value;
            }
        }
    }