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 c140d4f

Browse filesBrowse files
committed
prevent PHP from magically setting a 302 header, see http://www.php.net/manual/en/function.header.php
1 parent 1206176 commit c140d4f
Copy full SHA for c140d4f

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Response.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,12 @@ public function sendHeaders()
332332
}
333333

334334
// status
335-
header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText));
335+
header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode);
336336

337337
// headers
338338
foreach ($this->headers->allPreserveCase() as $name => $values) {
339339
foreach ($values as $value) {
340-
header($name.': '.$value, false);
340+
header($name.': '.$value, false, $this->statusCode);
341341
}
342342
}
343343

0 commit comments

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