--- common.inc.old	2009-10-05 00:51:46.000000000 -0400
+++ common.inc	2009-10-13 01:27:18.000000000 -0400
@@ -583,10 +583,18 @@
     case 301: // Moved permanently
     case 302: // Moved temporarily
     case 307: // Moved temporarily
-      $location = $result->headers['Location'];
+      if($result->headers['Location'][0] == '.') {
+          if($url[strlen($url)-1] != '/') {
+              $url .= "/";
+          }
+          
+          $location = $url .  $result->headers['Location'];
+      } else {
+          $location = $result->headers['Location'];
+      }
 
       if ($retry) {
-        $result = drupal_http_request($result->headers['Location'], $headers, $method, $data, --$retry);
+        $result = drupal_http_request($location, $headers, $method, $data, --$retry);
         $result->redirect_code = $result->code;
       }
       $result->redirect_url = $location;
