includes/http.php
changeset 1135 56c0abbdad3e
parent 1113 000791abdc7e
child 1224 a54e149f4a78
--- a/includes/http.php	Wed Nov 11 23:44:10 2009 -0500
+++ b/includes/http.php	Wed Nov 11 23:48:55 2009 -0500
@@ -153,6 +153,13 @@
   var $headers = array();
   
   /**
+   * Follow server-side redirects; defaults to true.
+   * @var bool
+   */
+  
+  var $follow_redirects = true;
+  
+  /**
    * Cached response.
    * @var string, or bool:false if the request hasn't been sent yet
    */
@@ -450,7 +457,7 @@
     }
     // obey redirects
     $i = 0;
-    while ( $i < 20 )
+    while ( $i < 20 && $this->follow_redirects )
     {
       $incoming_headers = $this->get_response_headers_array();
       if ( !$incoming_headers )