Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Expressive 3: Error Response and Not Found Response not issolated for each $app->handle()  #560

@wshafer

Description

@wshafer

Provide a narrative description of what you are trying to accomplish.

When using event loops like Swoole or ReactPHP each call to handle() that results in an error or not found response is adding to the existing open stream.

Since the error response and the not found response are retrieved through the container, a new response with a new stream is not created. Instead the existing open stream is used for each call causing multiple requests to bleed together.

Code to reproduce the issue

$response = $app->handle($request);
$response = $app->handle($request);

print $response->getBody()->getContents();

Expected results

Only one error or not found page in the response body.

Actual results

getContents() includes multiple responses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions