Skip to content

Responses dropped by middlewares are not registered #221

Description

@fadarrizz

Firstly, I really like this package. Really nice work!

In my app, I want to act based on the fact if the ExecuteJavascriptMiddleware drops a response.

However, this is not registered anywhere besides info logging, resulting in an empty array of items without an exception or event raised.

After digging in, I saw the Downloader class doesn't do anything when noticing a dropped response by a middleware (Downloader.php, line 131-137):

        ...
        foreach ($this->middleware as $middleware) {
            $response = $middleware->handleResponse($response);

            if ($response->wasDropped()) {
                return;
            }
        }
       ...

Shouldn't this dispatch a ResponseDropped event or something else?

I'm willing to provide a PR if we can figure out a solution.

Thanks for the help!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions