diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
index 4b66223..b52dd68 100644
--- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -1022,11 +1022,6 @@ protected function curlExec($curl_options, $redirect = FALSE) {
     // fragment in the request to the server, causing some web servers
     // to reject the request citing "400 - Bad Request". To prevent
     // this, we strip the fragment from the request.
-    // TODO: Remove this for Drupal 8, since fixed in curl 7.20.0.
-    if (!empty($curl_options[CURLOPT_URL]) && strpos($curl_options[CURLOPT_URL], '#')) {
-      $original_url = $curl_options[CURLOPT_URL];
-      $curl_options[CURLOPT_URL] = strtok($curl_options[CURLOPT_URL], '#');
-    }
 
     $url = empty($curl_options[CURLOPT_URL]) ? curl_getinfo($this->curlHandle, CURLINFO_EFFECTIVE_URL) : $curl_options[CURLOPT_URL];
 
@@ -1054,16 +1049,6 @@ protected function curlExec($curl_options, $redirect = FALSE) {
     // letting cURL handle redirects we take of them ourselves to
     // to prevent fragments being sent to the web server as part
     // of the request.
-    // TODO: Remove this for Drupal 8, since fixed in curl 7.20.0.
-    if (in_array($status, array(300, 301, 302, 303, 305, 307)) && $this->redirect_count < $this->maximumRedirects) {
-      if ($this->drupalGetHeader('location')) {
-        $this->redirect_count++;
-        $curl_options = array();
-        $curl_options[CURLOPT_URL] = $this->drupalGetHeader('location');
-        $curl_options[CURLOPT_HTTPGET] = TRUE;
-        return $this->curlExec($curl_options, TRUE);
-      }
-    }
 
     $this->drupalSetContent($content, isset($original_url) ? $original_url : curl_getinfo($this->curlHandle, CURLINFO_EFFECTIVE_URL));
     $message_vars = array(
