Skip to content

Commit fe5e483

Browse files
thorewif3l1x
authored andcommitted
Replace addHeader with setHeader
Because addHeader doesn't replace already defined headers. Content-Type is already defined in HttpExtension in nette/http. Since nginx 1.23 it leads to malfunction.
1 parent b5cbe9a commit fe5e483

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Response/StringResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public function setAttachment(bool $attachment = true): self
4848

4949
public function send(Nette\Http\IRequest $httpRequest, Nette\Http\IResponse $httpResponse): void
5050
{
51-
$httpResponse->addHeader('Content-Type', $this->contentType);
52-
$httpResponse->addHeader(
51+
$httpResponse->setHeader('Content-Type', $this->contentType);
52+
$httpResponse->setHeader(
5353
'Content-Disposition',
5454
($this->attachment ? 'attachment;' : '') . 'filename="' . $this->name . '"'
5555
);

0 commit comments

Comments
 (0)