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

Product update: cURL Error: HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) #335

Open
giobi opened this issue Mar 10, 2023 · 0 comments

Comments

@giobi
Copy link

giobi commented Mar 10, 2023

This happens on api call on endpoint for product update.
It's fixed by setting a different http version via curl_setopt

in file src/WooCommer/HttpClient/HttpClient.php after line 355
\curl_setopt($this->ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);

or better calling runtime not to break vendor package in you calls
$api = new Client($url, $consumerKey, $consumerSecret, [$version]); $api->http->setCustomCurlOptions([ CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ]);

of course it's an hotfix and it should be refactored probably

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