Created
October 10, 2013 12:40
-
-
Save halk/6917675 to your computer and use it in GitHub Desktop.
Fix candidate for Magento core bug: Magento API does not work with HTTP Basic Auth in combination with https backend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/public/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php b/public/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php | |
index aca1f93..0212822 100644 | |
--- a/public/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php | |
+++ b/public/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php | |
@@ -206,7 +206,7 @@ class Mage_Api_Model_Server_Adapter_Soap | |
$phpAuthPw = $this->getController()->getRequest()->getServer('PHP_AUTH_PW', false); | |
if ($phpAuthUser && $phpAuthPw) { | |
- $wsdlUrl = sprintf("http://%s:%s@%s", $phpAuthUser, $phpAuthPw, str_replace('http://', '', $wsdlUrl ) ); | |
+ $wsdlUrl = sprintf("http://%s:%s@%s", $phpAuthUser, $phpAuthPw, str_replace(array('http://', 'https://'), '', $wsdlUrl ) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment