Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5f93188

Browse filesBrowse files
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
2 parents 7ddfc5f + 5013f98 commit 5f93188
Copy full SHA for 5f93188

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎src/Symfony/Component/HttpFoundation/Response.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Response.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,16 +268,16 @@ public function sendHeaders()
268268
return $this;
269269
}
270270

271-
// status
272-
header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText));
273-
274271
// headers
275272
foreach ($this->headers->allPreserveCase() as $name => $values) {
276273
foreach ($values as $value) {
277274
header($name.': '.$value, false);
278275
}
279276
}
280277

278+
// status
279+
header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode);
280+
281281
// cookies
282282
foreach ($this->headers->getCookies() as $cookie) {
283283
setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.