Skip to content

Commit 6b584da

Browse files
committed
Answer HEAD Requests on the Service URI
This is important to allow Token Handling for Clients like OpenUi5
1 parent 7bfba22 commit 6b584da

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/PathSegment/Service.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ class Service implements JsonInterface, ResponseInterface
2121
{
2222
public function response(Transaction $transaction, ?ContextInterface $context = null): Response
2323
{
24+
if (Request::METHOD_HEAD === $transaction->getMethod()) {
25+
return $transaction->getResponse()->setCallback(function () use ($transaction) {
26+
$transaction->sendOutput('');
27+
});
28+
}
2429
$transaction->assertMethod(Request::METHOD_GET);
2530

2631
return $transaction->getResponse()->setCallback(function () use ($transaction) {

0 commit comments

Comments
 (0)