Commit b53e128
committed
bug symfony#59228 [HttpFoundation] Avoid mime type guess with temp files in
This PR was merged into the 7.1 branch.
Discussion
----------
[HttpFoundation] Avoid mime type guess with temp files in `BinaryFileResponse`
| Q | A
| ------------- | ---
| Branch? | 7.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
When using `SplTempFileObject` with `BinaryFileResponse`, the MIME type guesser cannot be used on the `php://temp` stream. The mime type should be passed manually to the `Content-Type` header.
Currently, if the content type header is not provided when passing a `SplTempFileObject` to `BinaryFileResponse`, the MIME type guesser throws an exception.
Commits
-------
223dcd1 [HttpFoundation] Avoid mime type guess with temp files in `BinaryFileResponse`BinaryFileResponse (alexandre-daubois)File tree
2 files changed
+17
-1
lines changed- src/Symfony/Component/HttpFoundation
- Tests
2 files changed
+17
-1
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
193 | 198 | | |
194 | 199 | | |
195 | 200 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
461 | 472 | | |
0 commit comments