Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred creating the expectation "Syntax error" on Respond with large Body #3

Closed
enduro44 opened this issue Nov 13, 2020 · 0 comments

Comments

@enduro44
Copy link
Contributor

Hi @mcustiel

When sending request with large size body
$I->expectARequestToRemoteServiceWithAResponse( Phiremock::on($this->requestProxy())->then( Respond::withStatusCode(200)->andBody($largeBody) ) );

I got this error :
An error occurred creating the expectation: array ( 0 => 'Syntax error', ){"result" : "ERROR", "details" : ["Syntax error"]} vendor\mcustiel\phiremock-client\src\Phiremock.php:312 vendor\mcustiel\phiremock-client\src\Phiremock.php:114 vendor\mcustiel\phiremock-client\src\Phiremock.php:99

It turns out that is caused by new property MAXIMUM_BUFFER_SIZE in react/http/src/Server.php
reactphp/http@49b4799

To resolve this we need to override MAXIMUM_BUFFER_SIZE by using RequestBodyBufferMiddleware().

I've resoled and will soon submit my PR for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant