Skip to content

Commit

Permalink
Merge pull request #110 from akunzai/curl-http-version
Browse files Browse the repository at this point in the history
Support to change the CURL HTTP Version
  • Loading branch information
akunzai authored Nov 6, 2024
2 parents 0c46174 + 3713538 commit 87f9f4a
Show file tree
Hide file tree
Showing 40 changed files with 55 additions and 41 deletions.
6 changes: 6 additions & 0 deletions joomla/administrator/language/en-GB/com_magebridge.ini
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_POST_AS_ARRAY="CURL POST as array"
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_POST_AS_ARRAY_DESC="Most CURL versions accept the POST-argument as an array, but some don't. Only to be used when needed."
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_TIMEOUT="CURL timeout"
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_TIMEOUT_DESC="The number of seconds before the CURL connection will timeout"
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_HTTP_VERSION="CURL HTTP Version"
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_HTTP_VERSION_DESC="The HTTP version for the CURL connection will be used"
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_HTTP_VERSION_OPTION_NONE="Let CURL decide"
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_HTTP_VERSION_OPTION_1_1="Forces HTTP/1.1"
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_HTTP_VERSION_OPTION_2="Attempts HTTP 2"
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_HTTP_VERSION_OPTION_2TLS="Attempts HTTP 2 over TLS only"
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_DIRECT_OUTPUT="Direct output"
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_DIRECT_OUTPUT_DESC="List of Magento URLs that deliver direct output, but do not properly use HTTP-headers to do so"
COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_UPDATE_FORMAT="Update Format"
Expand Down
2 changes: 1 addition & 1 deletion joomla/com_magebridge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<creationDate>August 2017</creationDate>
<copyright>Copyright (C) 2017 Yireo.com. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<version>2.1.0</version>
<version>2.2.0</version>
<description>COM_MAGEBRIDGE_DESC</description>

<!-- installation part -->
Expand Down
6 changes: 6 additions & 0 deletions joomla/components/com_magebridge/models/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@
</field>
<field name="curl_post_as_array" type="magebridge.boolean"/>
<field name="curl_timeout" type="input"/>
<field name="curl_http_version" type="list" default="0">
<option value="0">COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_HTTP_VERSION_OPTION_NONE</option>
<option value="2">COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_HTTP_VERSION_OPTION_1_1</option>
<option value="3">COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_HTTP_VERSION_OPTION_2</option>
<option value="4">COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_CURL_HTTP_VERSION_OPTION_2TLS</option>
</field>
<field name="direct_output" type="textarea"/>
<field name="update_format" type="list">
<option value="tar.gz">COM_MAGEBRIDGE_MODEL_CONFIG_FIELD_UPDATE_FORMAT_OPTION_TAR</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public function __construct()
'spoof_headers' => 0,
'curl_post_as_array' => 1,
'curl_timeout' => 120,
'curl_http_version' => CURL_HTTP_VERSION_2TLS,
'enable_notfound' => 0,
'payment_urls' => '',
'direct_output' => '',
Expand Down
7 changes: 4 additions & 3 deletions joomla/components/com_magebridge/models/proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,14 +445,15 @@ protected function getCurlDefaultArguments()
CURLOPT_MAXREDIRS => 0,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_CONNECTTIMEOUT => MageBridgeModelConfig::load('curl_timeout'),
CURLOPT_TIMEOUT => MageBridgeModelConfig::load('curl_timeout'),
CURLOPT_DNS_CACHE_TIMEOUT => MageBridgeModelConfig::load('curl_timeout'),
CURLOPT_CONNECTTIMEOUT => intval(MageBridgeModelConfig::load('curl_timeout')),
CURLOPT_TIMEOUT => intval(MageBridgeModelConfig::load('curl_timeout')),
CURLOPT_DNS_CACHE_TIMEOUT => intval(MageBridgeModelConfig::load('curl_timeout')),
CURLOPT_DNS_USE_GLOBAL_CACHE => true,
CURLOPT_COOKIESESSION => true,
CURLOPT_FRESH_CONNECT => false,
CURLOPT_FORBID_REUSE => false,
CURLOPT_BUFFERSIZE => 8192,
CURLOPT_HTTP_VERSION => intval(MageBridgeModelConfig::load('curl_http_version')),
];
}

Expand Down
2 changes: 1 addition & 1 deletion joomla/libraries/yireo/yireo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<creationDate>September 2017</creationDate>
<copyright>Copyright 2016 Yireo.com. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL</license>
<version>2.1.0</version>
<version>2.2.0</version>

<languages folder="language/en-GB">
<language tag="en-GB">lib_yireo.ini</language>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://www.yireo.com/</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>MOD_MAGEBRIDGE_BLOCK_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/modules/mod_magebridge_cart/mod_magebridge_cart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>MOD_MAGEBRIDGE_CART_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/modules/mod_magebridge_cms/mod_magebridge_cms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://www.yireo.com/</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>MOD_MAGEBRIDGE_CMS_DESC</description>

<files>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>MOD_MAGEBRIDGE_LOGIN</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/modules/mod_magebridge_menu/mod_magebridge_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>MOD_MAGEBRIDGE_MENU_DESC</description>

<files>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>MOD_MAGEBRIDGE_NEWSLETTER_DESC</description>

<files>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>MOD_MAGEBRIDGE_PROGRESS_DESC</description>

<files>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>MOD_MAGEBRIDGE_SWITCHER_DESC</description>

<files>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://www.yireo.com/</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>MOD_MAGEBRIDGE_WIDGET_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/pkg_magebridge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<name>MageBridge</name>
<author>Charley Wu</author>
<creationDate>October 2022</creationDate>
<version>2.1.0</version>
<version>2.2.0</version>
<packagename>magebridge</packagename>

<files folder="packages">
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/authentication/magebridge/magebridge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_AUTHENTICATION_MAGEBRIDGE_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/community/magebridge/magebridge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<creationDate>August 2017</creationDate>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<copyright>Copyright (C) 2017 Yireo.com. All rights reserved.</copyright>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_COMMUNITY_MAGEBRIDGE_DESC</description>
<isapplication>false</isapplication>

Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/content/magebridge/magebridge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_CONTENT_MAGEBRIDGE_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/finder/magebridge/magebridge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_FINDER_MAGEBRIDGE_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/magebridge/magebridge/magebridge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_MAGEBRIDGE_MAGEBRIDGE_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/magebridgestore/falang/falang.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_MAGEBRIDGESTORE_FALANG_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/magebridgestore/joomfish/joomfish.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_MAGEBRIDGESTORE_JOOMFISH_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/magebridgestore/joomla/joomla.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_MAGEBRIDGESTORE_JOOMLA_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/magebridgestore/nooku/nooku.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_MAGEBRIDGESTORE_NOOKU_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/magento/magebridge/magebridge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_MAGENTO_MAGEBRIDGE_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/search/magebridge/magebridge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_SEARCH_MAGEBRIDGE_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/system/magebridge/magebridge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_SYSTEM_MAGEBRIDGE_DESC</description>

<files>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_SYSTEM_MAGEBRIDGEPOSITIONS_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/system/magebridgepre/magebridgepre.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_SYSTEM_MAGEBRIDGEPRE_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/system/magebridgert/magebridgert.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_SYSTEM_MAGEBRIDGERT_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/system/magebridget3/magebridget3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_SYSTEM_MAGEBRIDGET3_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/system/magebridgeyoo/magebridgeyoo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_SYSTEM_MAGEBRIDGEYOO_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/system/magebridgezoo/magebridgezoo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_SYSTEM_MAGEBRIDGEZOO_DESC</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/plugins/user/magebridge/magebridge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_USER_MAGEBRIDGE_DESC</description>

<files>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU General Public License version 3 or later</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.yireo.com</authorUrl>
<version>2.1.0</version>
<version>2.2.0</version>
<description>PLG_SYSTEM_MAGEBRIDGEFIRSTLAST_XML_DESCRIPTION</description>

<files>
Expand Down
2 changes: 1 addition & 1 deletion joomla/templates/magebridge_root/templateDetails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<authorUrl>https://www.yireo.com</authorUrl>
<copyright>Copyright 2016 Yireo.com. All rights reserved.</copyright>
<license>GNU/GPL</license>
<version>2.1.0</version>
<version>2.2.0</version>
<description>MageBridge Root Template</description>
<files>
<filename>index.php</filename>
Expand Down
2 changes: 1 addition & 1 deletion magento/app/code/community/Yireo/MageBridge/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<modules>
<Yireo_MageBridge>
<version>2.1.0</version>
<version>2.2.0</version>
</Yireo_MageBridge>
</modules>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<modules>
<Yireo_MageBridgeTheme>
<version>2.1.0</version>
<version>2.2.0</version>
</Yireo_MageBridgeTheme>
</modules>

Expand Down
6 changes: 3 additions & 3 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<element>pkg_magebridge</element>
<type>package</type>
<client>site</client>
<version>2.1.0</version>
<infourl title="MageBridge">https://github.com/akunzai/MageBridgeCore/releases/2.1.0</infourl>
<version>2.2.0</version>
<infourl title="MageBridge">https://github.com/akunzai/MageBridgeCore/releases/2.2.0</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/akunzai/MageBridgeCore/releases/download/2.1.0/pkg_magebridge.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/akunzai/MageBridgeCore/releases/download/2.2.0/pkg_magebridge.zip</downloadurl>
</downloads>
<targetplatform name="joomla" version="4" />
</update>
Expand Down

0 comments on commit 87f9f4a

Please sign in to comment.