Skip to content

Commit 3b05689

Browse files
committed
Fix request dispatching inside development webserver
1 parent 65b6a23 commit 3b05689

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ Web change log
33

44
## ?.?.? / ????-??-??
55

6+
## 4.4.1 / 2024-07-07
7+
8+
* Fixed request dispatching inside development webserver - @thekid
9+
610
## 4.4.0 / 2024-06-10
711

812
* Added trace marker (*debug* or *error*) to the server log files when

src/main/php/xp/web/dev/Console.class.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ function($m) use($context) {
4949
public function filter($req, $res, $invocation) {
5050
$buffer= new Response(new Buffer());
5151

52+
$proceed= [];
5253
try {
5354
ob_start();
54-
yield from $invocation->proceed($req, $buffer);
55+
foreach ($invocation->proceed($req, $buffer) as $event => $arg) {
56+
$proceed[$event]= $arg;
57+
}
5558
$status= 200;
5659
$kind= 'debug';
5760
$debug= ob_get_clean();
@@ -61,6 +64,7 @@ public function filter($req, $res, $invocation) {
6164
$debug= ob_get_clean()."\n".XPException::wrap($t)->toString();
6265
} finally {
6366
$buffer->end();
67+
yield from $proceed;
6468
}
6569

6670
$res->trace= $buffer->trace;

0 commit comments

Comments
 (0)