10000 [HttpFoundation] Fixed messed up headers by Burgov · Pull Request #7189 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpFoundation] Fixed messed up headers #7189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
created test demonstrating how calling __toString on the ResponseHead…
…erBag (triggered by a __toString on Response) causes the response headers to get messed up
  • Loading branch information
Bart van den Burg committed Feb 26, 2013
commit b445a47c35898ccf0c0fb01ca272a42d0698b5d2
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,20 @@ public function testMakeDisposition($disposition, $filename, $filenameFallback,
$this->assertEquals($expected, $headers->makeDisposition($disposition, $filename, $filenameFallback));
}

public function testToStringDoesntMessUpHeaders()
{
$headers = new ResponseHeaderBag();

$headers->set('Location', 'http://www.symfony.com');
$headers->set('Content-type', 'text/html');

(string) $headers;

$allHeaders = $headers->allPreserveCase();
$this->assertEquals(array('http://www.symfony.com'), $allHeaders['Location']);
$this->assertEquals(array('text/html'), $allHeaders['Content-type']);
}

public function provideMakeDisposition()
{
return array(
Expand Down
0