Skip to content

Commit

Permalink
removed fix for IE
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Sep 16, 2023
1 parent 625195f commit 1749bc1
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class Response implements IResponse
/** @var bool Whether warn on possible problem with data in output buffer */
public $warnOnBuffer = true;

/** @var bool Send invisible garbage for IE 6? */
/** @deprecated */
private static $fixIE = true;

/** @var int HTTP response code */
Expand Down Expand Up @@ -239,20 +239,6 @@ public function getHeaders(): array
}


public function __destruct()
{
if (
self::$fixIE
&& strpos($_SERVER['HTTP_USER_AGENT'] ?? '', 'MSIE ') !== false
&& in_array($this->code, [400, 403, 404, 405, 406, 408, 409, 410, 500, 501, 505], true)
&& preg_match('#^text/html(?:;|$)#', (string) $this->getHeader('Content-Type'))
) {
echo Nette\Utils\Random::generate(2000, " \t\r\n"); // sends invisible garbage for IE
self::$fixIE = false;
}
}


/**
* Sends a cookie.
* @param string|int|\DateTimeInterface $expire expiration time, value null means "until the browser session ends"
Expand Down

0 comments on commit 1749bc1

Please sign in to comment.