diff options
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc index c0f2351c3..9b582c446 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -752,7 +752,8 @@ 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 URL of the redirect + * target. * - 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 @@ -1008,7 +1009,9 @@ function drupal_http_request($url, array $options = array()) { $result = drupal_http_request($location, $options); $result->redirect_code = $code; } - $result->redirect_url = $location; + if (!isset($result->redirect_url)) { + $result->redirect_url = $location; + } break; default: $result->error = $status_message; |