[HttpFoundation] Workaround HHVM rewriting HTTP response line

This commit is contained in:
Nicolas Grekas 2015-11-26 07:58:58 +01:00
parent 7ddfc5fae9
commit 5013f9895f
1 changed files with 3 additions and 3 deletions

View File

@ -268,9 +268,6 @@ class Response
return $this;
}
// status
header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText));
// headers
foreach ($this->headers->allPreserveCase() as $name => $values) {
foreach ($values as $value) {
@ -278,6 +275,9 @@ class Response
}
}
// status
header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode);
// cookies
foreach ($this->headers->getCookies() as $cookie) {
setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());