diff --git a/lib/Client/Protocol/Command/Argument/FetchOptions.php b/lib/Client/Protocol/Command/Argument/FetchOptions.php index 2006600..ef5ccb0 100644 --- a/lib/Client/Protocol/Command/Argument/FetchOptions.php +++ b/lib/Client/Protocol/Command/Argument/FetchOptions.php @@ -57,7 +57,7 @@ final class FetchOptions public function withHeaders(): self { - return $this->with('BODY[HEADER]'); + return $this->with('BODY.PEEK[HEADER]'); } public function withHeader(string ...$fields): self @@ -86,12 +86,12 @@ final class FetchOptions public function withBodyText(): self { - return $this->with('BODY[TEXT]'); + return $this->with('BODY.PEEK[TEXT]'); } public function withBody(): self { - return $this->with('BODY[]'); + return $this->with('BODY.PEEK[]'); } public function withBodySection(string $section): self @@ -102,7 +102,7 @@ final class FetchOptions return $this; } - return $this->with(sprintf('BODY[%s]', $section)); + return $this->with(sprintf('BODY.PEEK[%s]', $section)); } public function with(string $item): self diff --git a/lib/Client/Protocol/CommandExecutor.php b/lib/Client/Protocol/CommandExecutor.php index a7276a0..e1028ce 100644 --- a/lib/Client/Protocol/CommandExecutor.php +++ b/lib/Client/Protocol/CommandExecutor.php @@ -68,7 +68,7 @@ final class CommandExecutor $tag = $this->tags->next(); $this->writer->write($tag, new RequestFrame(sprintf( - 'UID FETCH %s (UID BODY[%s])', + 'UID FETCH %s (UID BODY.PEEK[%s])', $target->sequenceSet()->toCommand(), $section, )));