bug #16676 [HttpFoundation] Workaround HHVM rewriting HTTP response line (nicolas-grekas)
This PR was merged into the 2.3 branch.
Discussion
----------
[HttpFoundation] Workaround HHVM rewriting HTTP response line
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16481, #9365
| License | MIT
| Doc PR | -
Commits
-------
5013f98
[HttpFoundation] Workaround HHVM rewriting HTTP response line
This commit is contained in:
commit
5f93188dc0
@ -268,9 +268,6 @@ class Response
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// status
|
|
||||||
header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText));
|
|
||||||
|
|
||||||
// headers
|
// headers
|
||||||
foreach ($this->headers->allPreserveCase() as $name => $values) {
|
foreach ($this->headers->allPreserveCase() as $name => $values) {
|
||||||
foreach ($values as $value) {
|
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
|
// cookies
|
||||||
foreach ($this->headers->getCookies() as $cookie) {
|
foreach ($this->headers->getCookies() as $cookie) {
|
||||||
setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());
|
setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());
|
||||||
|
Reference in New Issue
Block a user