summaryrefslogtreecommitdiff
path: root/modules/simpletest/drupal_web_test_case.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-11-23 18:12:08 +0000
committerDries Buytaert <dries@buytaert.net>2008-11-23 18:12:08 +0000
commit6a93b9d4c40968c073d2be4611cb6b96703b5f64 (patch)
tree233a1325306afd7c009caec82f870042e35b08a2 /modules/simpletest/drupal_web_test_case.php
parenta7b2b9dfd1d17c75afb2f64812d5384efdffb7e4 (diff)
downloadbrdo-6a93b9d4c40968c073d2be4611cb6b96703b5f64.tar.gz
brdo-6a93b9d4c40968c073d2be4611cb6b96703b5f64.tar.bz2
- Patch #336043 by c960657: skip calls to curlExec() in curlConnect(). Nice find, c960657\!
Diffstat (limited to 'modules/simpletest/drupal_web_test_case.php')
-rw-r--r--modules/simpletest/drupal_web_test_case.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index a81a2d74a..10d95a546 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -784,13 +784,13 @@ class DrupalWebTestCase {
}
/**
- * Initializes the cURL connection and gets a session cookie.
+ * Initializes the cURL connection.
*
- * This function will add authentication headers as specified in
- * simpletest_httpauth_username and simpletest_httpauth_pass variables.
- * Also, see the description of $curl_options among the properties.
+ * This function will add authentication headers as specified in the
+ * simpletest_httpauth_username and simpletest_httpauth_pass variables. Also,
+ * see the description of $curl_options among the properties.
*/
- protected function curlConnect() {
+ protected function curlInitialize() {
global $base_url, $db_prefix;
if (!isset($this->ch)) {
$this->ch = curl_init();
@@ -812,7 +812,7 @@ class DrupalWebTestCase {
}
$curl_options[CURLOPT_USERPWD] = $auth;
}
- return $this->curlExec($curl_options);
+ curl_setopt_array($this->ch, $this->curl_options + $curl_options);
}
}
@@ -825,7 +825,7 @@ class DrupalWebTestCase {
* Content returned from the exec.
*/
protected function curlExec($curl_options) {
- $this->curlConnect();
+ $this->curlInitialize();
$url = empty($curl_options[CURLOPT_URL]) ? curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL) : $curl_options[CURLOPT_URL];
curl_setopt_array($this->ch, $this->curl_options + $curl_options);
$this->drupalSetContent(curl_exec($this->ch), curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL));