Projet

Général

Profil

Révision 6ff32cea

Ajouté par Florent Torregrosa il y a environ 9 ans

Update core to 7.36

Voir les différences:

drupal7/modules/simpletest/drupal_web_test_case.php
1769 1769
  protected function curlExec($curl_options, $redirect = FALSE) {
1770 1770
    $this->curlInitialize();
1771 1771

  
1772
    // cURL incorrectly handles URLs with a fragment by including the
1773
    // fragment in the request to the server, causing some web servers
1774
    // to reject the request citing "400 - Bad Request". To prevent
1775
    // this, we strip the fragment from the request.
1776
    // TODO: Remove this for Drupal 8, since fixed in curl 7.20.0.
1777
    if (!empty($curl_options[CURLOPT_URL]) && strpos($curl_options[CURLOPT_URL], '#')) {
1778
      $original_url = $curl_options[CURLOPT_URL];
1779
      $curl_options[CURLOPT_URL] = strtok($curl_options[CURLOPT_URL], '#');
1772
    if (!empty($curl_options[CURLOPT_URL])) {
1773
      // Forward XDebug activation if present.
1774
      if (isset($_COOKIE['XDEBUG_SESSION'])) {
1775
        $options = drupal_parse_url($curl_options[CURLOPT_URL]);
1776
        $options += array('query' => array());
1777
        $options['query'] += array('XDEBUG_SESSION_START' => $_COOKIE['XDEBUG_SESSION']);
1778
        $curl_options[CURLOPT_URL] = url($options['path'], $options);
1779
      }
1780

  
1781
      // cURL incorrectly handles URLs with a fragment by including the
1782
      // fragment in the request to the server, causing some web servers
1783
      // to reject the request citing "400 - Bad Request". To prevent
1784
      // this, we strip the fragment from the request.
1785
      // TODO: Remove this for Drupal 8, since fixed in curl 7.20.0.
1786
      if (strpos($curl_options[CURLOPT_URL], '#')) {
1787
        $original_url = $curl_options[CURLOPT_URL];
1788
        $curl_options[CURLOPT_URL] = strtok($curl_options[CURLOPT_URL], '#');
1789
      }
1780 1790
    }
1781 1791

  
1782 1792
    $url = empty($curl_options[CURLOPT_URL]) ? curl_getinfo($this->curlHandle, CURLINFO_EFFECTIVE_URL) : $curl_options[CURLOPT_URL];

Formats disponibles : Unified diff