summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-06-21 23:09:52 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-06-21 23:09:52 -0700
commitd8d8589bc0795642d2c414196ca8dacd75a22cf0 (patch)
tree896d385be93aafa7dad4942d129d7380cb154dc7 /includes
parente7a8f5129682d66b8c9454cd6fecb424e664d0b8 (diff)
downloadbrdo-d8d8589bc0795642d2c414196ca8dacd75a22cf0.tar.gz
brdo-d8d8589bc0795642d2c414196ca8dacd75a22cf0.tar.bz2
Issue #1081068 by wojtha, bfroehle, Heine: Fixed drupal_http_request() inconsistent redirect_url().
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc7
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;