Skip to content

Commit fdb076e

Browse files
committed
MAGETWO-69737: Merge branch 'patch-2' of https://github.com/redelschaap/magento2 into MAGETWO-69737-PR-7405
Conflicts: lib/internal/Magento/Framework/HTTP/Adapter/Curl.php
2 parents 6db1fa3 + 2b9a6b3 commit fdb076e

File tree

1 file changed

+5
-3
lines changed
  • lib/internal/Magento/Framework/HTTP/Adapter

1 file changed

+5
-3
lines changed

lib/internal/Magento/Framework/HTTP/Adapter/Curl.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,14 @@ public function write($method, $url, $http_ver = '1.1', $headers = [], $body = '
173173
curl_setopt($this->_getResource(), CURLOPT_RETURNTRANSFER, true);
174174
if ($method == \Zend_Http_Client::POST) {
175175
curl_setopt($this->_getResource(), CURLOPT_POST, true);
176+
curl_setopt($this->_getResource(), CURLOPT_CUSTOMREQUEST, 'POST');
176177
curl_setopt($this->_getResource(), CURLOPT_POSTFIELDS, $body);
177-
} elseif ($method == \Zend_Http_Client::GET) {
178-
curl_setopt($this->_getResource(), CURLOPT_HTTPGET, true);
179178
} elseif ($method == \Zend_Http_Client::PUT) {
180-
curl_setopt($this->_getResource(), CURLOPT_CUSTOMREQUEST, \Zend_Http_Client::PUT);
179+
curl_setopt($this->_getResource(), CURLOPT_CUSTOMREQUEST, 'PUT');
181180
curl_setopt($this->_getResource(), CURLOPT_POSTFIELDS, $body);
181+
} elseif ($method == \Zend_Http_Client::GET) {
182+
curl_setopt($this->_getResource(), CURLOPT_HTTPGET, true);
183+
curl_setopt($this->_getResource(), CURLOPT_CUSTOMREQUEST, 'GET');
182184
}
183185

184186
if (is_array($headers)) {

0 commit comments

Comments
 (0)