Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitc93c22a

Browse files
author
naitsirch
committed
Use date format instead of RFC7231 constant of DateTimeInterface
because of missing support in early versions of PHP 7 and 7.1
1 parente3e952b commitc93c22a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ public function testStream()
376376
publicfunctiontestPrepareNotAddingContentTypeHeaderIfNoContentResponse()
377377
{
378378
$request = Request::create('/');
379-
$request->headers->set('If-Modified-Since',(new \DateTimeImmutable('now'))->format(\DateTimeInterface::RFC7231));
379+
$request->headers->set('If-Modified-Since',date('D, d M Y H:i:s').' GMT');
380380

381381
$response =newBinaryFileResponse(__DIR__.'/File/Fixtures/test.gif',200, ['Content-Type' =>'application/octet-stream']);
382382
$response->setLastModified(new \DateTimeImmutable('-1 day'));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp