8000 minor #13115 [HttpFoundation] removed wrong HTTP header (fabpot) · saro0h/symfony@1c039ce · GitHub
[go: up one dir, main page]

Skip to content

Commit 1c039ce

Browse files
committed
minor symfony#13115 [HttpFoundation] removed wrong HTTP header (fabpot)
This PR was merged into the 2.3 branch. Discussion ---------- [HttpFoundation] removed wrong HTTP header | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#12194 | License | MIT | Doc PR | n/a Commits ------- 73dddac [HttpFoundation] removed wrong HTTP header
2 parents 841f532 + 73dddac commit 1c039ce

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/Symfony/Component/HttpFoundation/BinaryFileResponse.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ public function prepare(Request $request)
170170
{
171171
$this->headers->set('Content-Length', $this->file->getSize());
172172
$this->headers->set('Accept-Ranges', 'bytes');
173-
$this->headers->set('Content-Transfer-Encoding', 'binary');
174173

175174
if (!$this->headers->has('Content-Type')) {
176175
$this->headers->set('Content-Type', $this->file->getMimeType() ?: 'application/octet-stream');

src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ public function testRequests($requestRange, $offset, $length, $responseRange)
7777
$response->sendContent();
7878

7979
$this->assertEquals(206, $response->getStatusCode());
80-
$this->assertEquals('binary', $response->headers->get('Content-Transfer-Encoding'));
8180
$this->assertEquals($responseRange, $response->headers->get('Content-Range'));
8281
}
8382

@@ -113,7 +112,6 @@ public function testFullFileRequests($requestRange)
113112
$response->sendContent();
114113

115114
$this->assertEquals(200, $response->getStatusCode());
116-
$this->assertEquals('binary', $response->headers->get('Content-Transfer-Encoding'));
117115
}
118116

119117
public function provideFullFileRanges()
@@ -144,7 +142,6 @@ public function testInvalidRequests($requestRange)
144142
$response->sendContent();
145143

146144
$this->assertEquals(416, $response->getStatusCode());
147-
$this->assertEquals('binary', $response->headers->get('Content-Transfer-Encoding'));
148145
#$this->assertEquals('', $response->headers->get('Content-Range'));
149146
}
150147

0 commit comments

Comments
 (0)
0