Skip to content

Commit 0d4a498

Browse files
committed
[MIME] use address for body at PathHeader
1 parent 6caa25d commit 0d4a498

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
public function getBodyAsString(): 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+
public function testPathHeaderHasNoName()
351+
{
352+
$headers = new Headers();
353+
354+
$headers->addPathHeader('Return-Path', new Address('some@path', 'any ignored name'));
355+
$this->assertSame('<some@path>', $headers->get('Return-Path')->getBodyAsString());
356+
}
349357
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy