Skip to content

Commit d02e35e

Browse files
committed
fix: reset response format to prevent state pollution between requests
1 parent ffee8c4 commit d02e35e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Server/RequestDispatcher.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,11 @@ public function dispatch(Request $request, Response $response, SwooleCoroutineHt
127127
}
128128
}
129129

130-
// Clear response data
130+
// Clear response data and reset format
131131
$yiiResponse->data = null;
132132
$yiiResponse->content = null;
133133
$yiiResponse->stream = null;
134+
$yiiResponse->format = YiiResponse::FORMAT_HTML; // Reset to HTML format
134135
if (property_exists($yiiResponse, '_headers')) {
135136
$yiiResponse->_headers = null;
136137
}

0 commit comments

Comments
 (0)