Closed david-bzh closed 1 year ago
Hi @david-bzh thanks for the PR! Could you elaborate what your PR does, and how it improves stability?
If you look at wp-all-import-pro/classes/updater.php
- you'll see wp_remote_post
being used which essentially sends a POST
not a GET
. So the plugin itself uses a POST
.
Hi @junaidbhura thank you for your feedback, which allowed me to deepen on my problematic,
it seems that there were two problems for the failed to execute unzip.
Problème 1 : Api return of wp all export by request POST
request POST ( after )
This problem seems to be solved without really knowing how.
the posibile actions are :
For my part I did not do anything else for this problem, request GET does not do any verification on the key
request GET
request POST
Problem 2 : defaut $arg_separator
for fn http_build_query()
On a client server $arg_separator
by default is &
and not &
Solution 1 : change code
$arg_separator
as http_build_query( $query_var, '', '&' )
Solution 2 : for the developer gist.github:
Create file composer.php.ini
arg_separator.input="&"
run cmd
php -n -c /usr/local/lib/composer.php.ini /usr/local/bin/composer.phar
Tell me if you want to do something else, sorry for the response time
Thanks @david-bzh I think the &
fix would be a good one to make here instead? https://github.com/junaidbhura/composer-wp-pro-plugins/blob/master/Http.php#L31 so that all the plugins can benefit from it?
Hi @junaidbhura , yes it is the best solution, I changed my commit with the new patches. Thanks !
Thanks @david-bzh ! Let me test this out before merging!
Looks good and merged thanks @david-bzh !
Checklist:
Description
I changed api call in POST for GET the api return seems more stable.
How has this been tested?
I have tested installation for :
testing environment