diff --git includes/common.inc includes/common.inc
index afeaa9f..faf5cc7 100644
--- includes/common.inc
+++ includes/common.inc
@@ -347,21 +347,24 @@ function drupal_get_html_head() {
  *
  * This function can be called as long the HTML header hasn't been sent.
  *
- * @param $url
- *   A url for the feed.
+ * @param $path_or_external_url
+ *   The internal path or external URL of the feed. This should be either a raw
+ *   path (not having passed through url()) or an external URL; do not pass the
+ *   output of url() to this function.
  * @param $title
  *   The title of the feed.
  */
-function drupal_add_feed($url = NULL, $title = '') {
+function drupal_add_feed($path_or_external_url = NULL, $title = '') {
   $stored_feed_links = &drupal_static(__FUNCTION__, array());
 
-  if (isset($url)) {
-    $stored_feed_links[$url] = theme('feed_icon', array('url' => $url, 'title' => $title));
+  if (isset($path_or_external_url)) {
+    $href = url_is_external($path_or_external_url) ? $path_or_external_url : url($path_or_external_url, array('absolute' => TRUE));
+    $stored_feed_links[$path_or_external_url] = theme('feed_icon', array('url' => $href, 'title' => $title));
 
     drupal_add_html_head_link(array('rel' => 'alternate',
                           'type' => 'application/rss+xml',
                           'title' => $title,
-                          'href' => $url));
+                          'href' => $href));
   }
   return $stored_feed_links;
 }
@@ -738,7 +741,7 @@ function drupal_access_denied() {
  *     call may take. The default is 30 seconds. If a timeout occurs, the error
  *     code is set to the HTTP_REQUEST_TIMEOUT constant.
  *   - context: A context resource created with stream_context_create().
- * 
+ *
  * @return object
  *   An object that can have one or more of the following components:
  *   - request: A string containing the request body that was sent.
diff --git includes/theme.inc includes/theme.inc
index 3ceecd5..251fa5f 100644
--- includes/theme.inc
+++ includes/theme.inc
@@ -1866,7 +1866,7 @@ function theme_more_help_link($variables) {
  *
  * @param $variables
  *   An associative array containing:
- *   - url: The url of the feed.
+ *   - url: The absolute url of the feed.
  *   - title: A descriptive title of the feed.
  */
 function theme_feed_icon($variables) {
diff --git modules/forum/forum.module modules/forum/forum.module
index 0a5a8f9..ef81236 100644
--- modules/forum/forum.module
+++ modules/forum/forum.module
@@ -982,7 +982,7 @@ function template_preprocess_forums(&$variables) {
 
     if ($variables['tid'] && !in_array($variables['tid'], variable_get('forum_containers', array()))) {
       $variables['topics'] = theme('forum_topic_list', $variables);
-      drupal_add_feed('taxonomy/term/' . $variables['tid'] . '/0/feed', 'RSS - ' . $title);
+      drupal_add_feed('taxonomy/term/' . $variables['tid'] . '/feed', 'RSS - ' . $title);
     }
     else {
       $variables['topics'] = '';
diff --git modules/node/node.module modules/node/node.module
index ddbc845..41015bf 100644
--- modules/node/node.module
+++ modules/node/node.module
@@ -2521,8 +2521,7 @@ function node_page_default() {
     $nodes = node_load_multiple($nids);
     $build = node_view_multiple($nodes);
 
-    $feed_url = url('rss.xml', array('absolute' => TRUE));
-    drupal_add_feed($feed_url, variable_get('site_name', 'Drupal') . ' ' . t('RSS'));
+    drupal_add_feed('rss.xml', variable_get('site_name', 'Drupal') . ' ' . t('RSS'));
     $build['pager'] = array(
       '#theme' => 'pager',
       '#weight' => 5,
diff --git modules/simpletest/tests/common.test modules/simpletest/tests/common.test
index 2c9bca8..ee0e8f4 100644
--- modules/simpletest/tests/common.test
+++ modules/simpletest/tests/common.test
@@ -2191,3 +2191,86 @@ class DrupalGetRdfNamespacesTestCase extends DrupalWebTestCase {
     $this->assertTrue(!isset($ns['dc']), t('A prefix with conflicting namespaces is discarded.'));
   }
 }
+
+
+/**
+ * Basic tests for drupal_add_feed().
+ */
+class DrupalAddFeedTestCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'drupal_add_feed() tests',
+      'description' => 'Make sure that drupal_add_feed() works correctly with various constructs.',
+      'group' => 'System',
+    );
+  }
+
+  /**
+   * Test drupal_add_feed() with paths, URLs, and titles.
+   */
+  function testBasicFeedAddNoTitle() {
+    $path = $this->randomName(12);
+    $external_url = 'http://' . $this->randomName(12) . '/' . $this->randomName(12);
+    $fully_qualified_local_url = url($this->randomName(12), array('absolute' => TRUE));
+
+    $path_for_title = $this->randomName(12);
+    $external_for_title = 'http://' . $this->randomName(12) . '/' . $this->randomName(12);
+    $fully_qualified_for_title = url($this->randomName(12), array('absolute' => TRUE));
+
+    // Possible permutations of drupal_add_feed() to test.
+    // - 'input_url': the path passed to drupal_add_feed(),
+    // - 'output_url': the expected URL to be found in the header.
+    // - 'title' == the title of the feed as passed into drupal_add_feed().
+    $urls = array(
+      'path without title' => array(
+        'input_url' => $path,
+        'output_url' => url($path, array('absolute' => TRUE)),
+        'title' => '',
+      ),
+      'external url without title' => array(
+        'input_url' => $external_url,
+        'output_url' => $external_url,
+        'title' => '',
+      ),
+      'local url without title' => array(
+        'input_url' => $fully_qualified_local_url,
+        'output_url' => $fully_qualified_local_url,
+        'title' => '',
+      ),
+      'path with title' => array(
+        'input_url' => $path_for_title,
+        'output_url' => url($path_for_title, array('absolute' => TRUE)),
+        'title' => $this->randomName(12),
+      ),
+      'external url with title' => array(
+        'input_url' => $external_for_title,
+        'output_url' => $external_for_title,
+        'title' => $this->randomName(12),
+      ),
+      'local url with title' => array(
+        'input_url' => $fully_qualified_for_title,
+        'output_url' => $fully_qualified_for_title,
+        'title' => $this->randomName(12),
+      ),
+    );
+
+    foreach ($urls as $description => $feed_info) {
+      drupal_add_feed($feed_info['input_url'], $feed_info['title']);
+    }
+
+    $head_with_path = drupal_get_html_head();
+    foreach ($urls as $description => $feed_info) {
+      $this->assert((bool)preg_match($this->urlToRSSLinkPattern($feed_info['output_url'], $feed_info['title']), $head_with_path), t('Found correct feed header for %description', array('%description' => $description)), 'System');
+    }
+  }
+
+  /**
+   * Create a pattern representing the RSS feed in the page.
+   */
+  function urlToRSSLinkPattern($url, $title = '') {
+    // Escape any regular expression characters in the url ('?' is the worst).
+    $url = preg_replace('/([+?.*])/', '[$0]', $url);
+    $generated_pattern = '%<link +rel="alternate" +type="application/rss.xml" +title="' . $title . '" +href="' . $url . '" */>%';
+    return $generated_pattern;
+  }
+}
