﻿diff --git includes/common.inc includes/common.inc
index a6901f3..931ab4d 100644
--- includes/common.inc
+++ includes/common.inc
@@ -752,7 +752,7 @@ function drupal_access_denied() {
  *     received.
  *   - redirect_code: If redirected, an integer containing the initial response
  *     status code.
- *   - redirect_url: If redirected, a string containing the redirection location.
+ *   - redirect_url: If redirected, a string containing the final redirection location.
  *   - error: If an error occurred, the error message. Otherwise not set.
  *   - headers: An array containing the response headers as name/value pairs.
  *     HTTP header names are case-insensitive (RFC 2616, section 4.2), so for
@@ -1006,7 +1006,7 @@ function drupal_http_request($url, array $options = array()) {
         $result = drupal_http_request($location, $options);
         $result->redirect_code = $code;
       }
-      $result->redirect_url = $location;
+      $result->redirect_url = isset($result->redirect_url) ? $result->redirect_url : $location;
       break;
     default:
       $result->error = $status_message;
