You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the ExecuteJavascriptMiddleware handles a response, it's called once a response is received. So, the http client has already sent the request before it reaches the middleware.
My feeling is that the middleware should be able to handle the request before it is handled by something else.
Describe the bug
When using the
ExecuteJavascriptMiddleware
, two requests are sent. One by Browsershot, the other by Guzzle.Reproduction
My spider only has the
ExecuteJavascriptMiddleware
registered as downloader middleware.I placed dumps with the request object id in the following places, just before requests are sent:
RoachPHP\Http\Client
RoachPHP\Downloader\Middleware\ExecuteJavascriptMiddleware
When the spider runs, both dumps are shown:
Expected behavior
I was expecting only one request being sent: one from Browsershot, not also one from Guzzle.
Package versions (please complete the following information):
The text was updated successfully, but these errors were encountered: