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

Commit757fcbb

Browse files
bug#59796 [Mime] use address for body atPathHeader (tinect)
This PR was merged into the 6.4 branch.Discussion----------[Mime] use address for body at `PathHeader`| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->| License | MITWe noticed, that ReturnPath has wrong content in EML if any library is forcing key=>value.Setting it to `mail@example.com`, results into `<"mail@example.com" <mail@example.com>>` after stringify it which is not compliant: `Email \"\"mail@example.com"<mail@example.com\" does not comply with addr-spec of RFC 2822.`Commits-------0d4a498 [MIME] use address for body at PathHeader
2 parentsf48cf1b +0d4a498 commit757fcbb

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

‎src/Symfony/Component/Mime/Header/PathHeader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ public function getAddress(): Address
5757

5858
publicfunctiongetBodyAsString():string
5959
{
60-
return'<'.$this->address->toString().'>';
60+
return'<'.$this->address->getEncodedAddress().'>';
6161
}
6262
}

‎src/Symfony/Component/Mime/Tests/Header/HeadersTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,4 +346,12 @@ public function testSetHeaderParameterNotParameterized()
346346
$this->expectException(\LogicException::class);
347347
$headers->setHeaderParameter('Content-Disposition','name','foo');
348348
}
349+
350+
publicfunctiontestPathHeaderHasNoName()
351+
{
352+
$headers =newHeaders();
353+
354+
$headers->addPathHeader('Return-Path',newAddress('some@path','any ignored name'));
355+
$this->assertSame('<some@path>',$headers->get('Return-Path')->getBodyAsString());
356+
}
349357
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp