diff --git a/features/main/crud.feature b/features/main/crud.feature index 8dc25500ad2..a2381d1f9f3 100644 --- a/features/main/crud.feature +++ b/features/main/crud.feature @@ -60,6 +60,7 @@ Feature: Create-Retrieve-Update-Delete Then the response status code should be 200 And the response should be in JSON And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8" + And the header "Content-Location" should not exist And the JSON should be equal to: """ { diff --git a/src/State/Processor/RespondProcessor.php b/src/State/Processor/RespondProcessor.php index 64b07308d3f..58941e437c3 100644 --- a/src/State/Processor/RespondProcessor.php +++ b/src/State/Processor/RespondProcessor.php @@ -129,7 +129,7 @@ public function process(mixed $data, Operation $operation, array $uriVariables = $iri = $this->iriConverter->getIriFromResource($operation->getClass(), UrlGeneratorInterface::ABS_PATH, $operation); } - if ($iri) { + if ($iri && 'GET' !== $method) { $location = \sprintf('%s.%s', $iri, $request->getRequestFormat()); if (isset($requestParts['query'])) { $location .= '?'.$requestParts['query'];