File tree 4 files changed +11
-7
lines changed
4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class Elastica_Client
45
45
'timeout ' => self ::TIMEOUT ,
46
46
'headers ' => array (),
47
47
'servers ' => array (),
48
+ 'curl ' => array (),
48
49
'roundRobin ' => false ,
49
50
'log ' => false ,
50
51
);
Original file line number Diff line number Diff line change @@ -135,20 +135,21 @@ public function send() {
135
135
136
136
$ servers = $ this ->getClient ()->getConfig ('servers ' );
137
137
138
- /*$dir = sys_get_temp_dir();
138
+ /*
139
+
140
+ // Integration of temp file
141
+ $dir = sys_get_temp_dir();
139
142
$name = 'elasticaServers.json';
140
143
$file = $dir . DIRECTORY_SEPARATOR . $name;
141
-
142
- error_log($file);
143
144
144
145
if (!file_exists($file)) {
145
146
file_put_contents($file, 'hh');
146
147
error_log(print_r($this->getClient()->getCluster(), true));
147
- }*/
148
-
148
+ }
149
+
150
+ */
149
151
150
152
if (empty ($ servers )) {
151
- error_log (print_r ($ this ->getClient ()->getConfig ('url ' ), true ));
152
153
$ params = array (
153
154
'url ' => $ this ->getClient ()->getConfig ('url ' ),
154
155
'host ' => $ this ->getClient ()->getHost (),
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ public function exec(array $params) {
112
112
* @param resource $connection Curl connection
113
113
*/
114
114
protected function _setupCurl ($ connection ) {
115
+ foreach ($ this ->_request ->getClient ()->getConfig ('curl ' ) as $ key => $ param ) {
116
+ curl_setopt ($ connection , $ key , $ param );
117
+ }
115
118
}
116
119
117
120
/**
Original file line number Diff line number Diff line change @@ -20,6 +20,5 @@ class Elastica_Transport_Https extends Elastica_Transport_Http {
20
20
*/
21
21
protected function _setupCurl ($ connection ) {
22
22
parent ::_setupCurl ($ connection );
23
- curl_setopt ($ connection , CURLOPT_SSL_VERIFYPEER , false );
24
23
}
25
24
}
You can’t perform that action at this time.
0 commit comments