Index: wp-content/themes/classic/functions.php
===================================================================
--- wp-content/themes/classic/functions.php	(revision 10375)
+++ wp-content/themes/classic/functions.php	(working copy)
@@ -3,6 +3,9 @@
  * @package WordPress
  * @subpackage Classic_Theme
  */
+
+automatic_feed_links();
+
 if ( function_exists('register_sidebar') )
 	register_sidebar(array(
 		'before_widget' => '<li id="%1$s" class="widget %2$s">',
@@ -11,4 +14,4 @@
 		'after_title' => '',
 	));
 
-?>
+?>
\ No newline at end of file
Index: wp-content/themes/classic/header.php
===================================================================
--- wp-content/themes/classic/header.php	(revision 10375)
+++ wp-content/themes/classic/header.php	(working copy)
@@ -16,10 +16,6 @@
 		@import url( <?php bloginfo('stylesheet_url'); ?> );
 	</style>
 
-	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
-	<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
-	<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="<?php bloginfo('atom_url'); ?>" />
-
 	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
 	<?php wp_get_archives('type=monthly&format=link'); ?>
 	<?php //comments_popup_script(); // off by default ?>
Index: wp-content/themes/default/functions.php
===================================================================
--- wp-content/themes/default/functions.php	(revision 10375)
+++ wp-content/themes/default/functions.php	(working copy)
@@ -4,14 +4,17 @@
  * @subpackage Default_Theme
  */
 
-if ( function_exists('register_sidebar') )
-    register_sidebar(array(
-        'before_widget' => '<li id="%1$s" class="widget %2$s">',
-        'after_widget' => '</li>',
-        'before_title' => '<h2 class="widgettitle">',
-        'after_title' => '</h2>',
-    ));
+automatic_feed_links();
 
+if ( function_exists('register_sidebar') ) {
+	register_sidebar(array(
+		'before_widget' => '<li id="%1$s" class="widget %2$s">',
+		'after_widget' => '</li>',
+		'before_title' => '<h2 class="widgettitle">',
+		'after_title' => '</h2>',
+	));
+}
+
 /** @ignore */
 function kubrick_head() {
 	$head = "<style type='text/css'>\n<!--";
@@ -419,4 +422,4 @@
 		</div>
 	</div>
 </div>
-<?php } ?>
+<?php } ?>
\ No newline at end of file
Index: wp-content/themes/default/header.php
===================================================================
--- wp-content/themes/default/header.php	(revision 10375)
+++ wp-content/themes/default/header.php	(working copy)
@@ -13,8 +13,6 @@
 <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>
 
 <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
-<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
-<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
 <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
 
 <style type="text/css" media="screen">
Index: wp-includes/default-filters.php
===================================================================
--- wp-includes/default-filters.php	(revision 10375)
+++ wp-includes/default-filters.php	(working copy)
@@ -164,6 +164,7 @@
 add_filter('atom_service_url','atom_service_url_filter');
 
 // Actions
+add_action('wp_head', 'feed_links_extra', 12);
 add_action('wp_head', 'rsd_link');
 add_action('wp_head', 'wlwmanifest_link');
 add_action('wp_head', 'locale_stylesheet');
Index: wp-includes/feed-atom-comments.php
===================================================================
--- wp-includes/feed-atom-comments.php	(revision 10375)
+++ wp-includes/feed-atom-comments.php	(working copy)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: application/atom+xml; charset=' . get_option('blog_charset'), true);
+header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
 echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>';
 ?>
 <feed
Index: wp-includes/feed-atom.php
===================================================================
--- wp-includes/feed-atom.php	(revision 10375)
+++ wp-includes/feed-atom.php	(working copy)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: application/atom+xml; charset=' . get_option('blog_charset'), true);
+header('Content-Type: ' . feed_content_type('atom') . '; charset=' . get_option('blog_charset'), true);
 $more = 1;
 
 ?>
Index: wp-includes/feed-rdf.php
===================================================================
--- wp-includes/feed-rdf.php	(revision 10375)
+++ wp-includes/feed-rdf.php	(working copy)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: application/rdf+xml; charset=' . get_option('blog_charset'), true);
+header('Content-Type: ' . feed_content_type('rdf') . '; charset=' . get_option('blog_charset'), true);
 $more = 1;
 
 ?>
Index: wp-includes/feed-rss.php
===================================================================
--- wp-includes/feed-rss.php	(revision 10375)
+++ wp-includes/feed-rss.php	(working copy)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
+header('Content-Type: ' . feed_content_type('rss') . '; charset=' . get_option('blog_charset'), true);
 $more = 1;
 
 ?>
Index: wp-includes/feed-rss2-comments.php
===================================================================
--- wp-includes/feed-rss2-comments.php	(revision 10375)
+++ wp-includes/feed-rss2-comments.php	(working copy)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: text/xml;charset=' . get_option('blog_charset'), true);
+header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
 
 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
 ?>
Index: wp-includes/feed-rss2.php
===================================================================
--- wp-includes/feed-rss2.php	(revision 10375)
+++ wp-includes/feed-rss2.php	(working copy)
@@ -5,7 +5,7 @@
  * @package WordPress
  */
 
-header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
+header('Content-Type: ' . feed_content_type('rss2') . '; charset=' . get_option('blog_charset'), true);
 $more = 1;
 
 ?>
Index: wp-includes/feed.php
===================================================================
--- wp-includes/feed.php	(revision 10375)
+++ wp-includes/feed.php	(working copy)
@@ -508,4 +508,27 @@
 		);
 }
 
-?>
+/**
+ * Return the content type for specified feed type.
+ *
+ * @package WordPress
+ * @subpackage Feed
+ * @since 2.8.0
+ */
+function feed_content_type( $type = '' ) {
+	if ( empty($type) )
+		$type = get_default_feed();
+
+	$types = array(
+		'rss'  => 'application/rss+xml',
+		'rss2' => 'application/rss+xml',
+		'atom' => 'application/atom+xml',
+		'rdf'  => 'application/rdf+xml',
+	);
+
+	$content_type = ( !empty($types[$type]) ) ? $types[$type] : 'application/octet-stream';
+
+	return apply_filters( 'feed_content_type', $content_type, $type );
+}
+
+?>
\ No newline at end of file
Index: wp-includes/general-template.php
===================================================================
--- wp-includes/general-template.php	(revision 10375)
+++ wp-includes/general-template.php	(working copy)
@@ -1369,6 +1369,88 @@
 }
 
 /**
+ * Enable/disable automatic general feed link outputting.
+ *
+ * @since 2.8.0
+ *
+ * @param boolean $add Add or remove links. Defaults to true.
+ */
+function automatic_feed_links( $add = true ) {
+	if ( $add )
+		add_action( 'wp_head', 'feed_links', 11 );
+	else {
+		remove_action( 'wp_head', 'feed_links', 11 );
+		remove_action( 'wp_head', 'feed_links_extra', 12 );
+	}
+}
+
+/**
+ * Display the links to the general feeds.
+ *
+ * @since 2.8.0
+ *
+ * @param array $args Optional arguments.
+ */
+function feed_links( $args ) {
+	$defaults = array(
+		'seperator'   => _c('&raquo;|Seperator character feed titles in theme head'),
+		'rsstitle'    => __('%s Feed'),
+		'comstitle'   => __('%s Comments Feed'),
+	);
+
+	$args = wp_parse_args( $args, $defaults );
+
+	echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . sprintf( $args['rsstitle'], get_bloginfo('name') ) . '" href="' . get_feed_link() . "\" />\n";
+	echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . sprintf( $args['comstitle'], get_bloginfo('name') ) . '" href="' . get_feed_link( 'comments_' . get_default_feed() ) . "\" />\n";
+}
+
+/**
+ * Display the links to the extra feeds such as category feeds.
+ *
+ * @since 2.8.0
+ *
+ * @param array $args Optional arguments.
+ */
+function feed_links_extra( $args ) {
+	$defaults = array(
+		'seperator'   => _c('&raquo;|Seperator character feed titles in theme head'),
+		'singletitle' => __('%1$s %2$s %3$s Comments Feed'),
+		'cattitle'    => __('%1$s %2$s %3$s Category Feed'),
+		'tagtitle'    => __('%1$s %2$s %3$s Tag Feed'),
+		'authortitle' => __('%1$s %2$s Posts by %3$s Feed'),
+		'searchtitle' => __('%1$s %2$s Search Results for &quot;%3$s&quot; Feed'),
+	);
+
+	$args = wp_parse_args( $args, $defaults );
+
+	if ( is_single() || is_page() ) {
+		$post = &get_post( $id = 0 );
+		if ( comments_open() || pings_open() || $post->comment_count > 0 )
+			echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . sprintf( $args['singletitle'], get_bloginfo('name'), $args['seperator'], get_the_title() ) . '" href="' . get_post_comments_feed_link( $post->ID ) . "\" />\n";
+	}
+
+	elseif ( is_category() ) {
+		$cat_id = intval( get_query_var('cat') );
+		echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . sprintf( $args['cattitle'], get_bloginfo('name'), $args['seperator'], get_cat_name( $cat_id ) ) . '" href="' . get_category_feed_link( $cat_id ) . "\" />\n";
+	}
+
+	elseif ( is_tag() ) {
+		$tag_id = intval( get_query_var('tag_id') );
+		$tag = get_tag( $tag_id );
+		echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . sprintf( $args['tagtitle'], get_bloginfo('name'), $args['seperator'], $tag->name ) . '" href="' . get_tag_feed_link( $tag_id ) . "\" />\n";
+	}
+
+	elseif ( is_author() ) {
+		$author_id = intval( get_query_var('author') );
+		echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . sprintf( $args['authortitle'], get_bloginfo('name'), $args['seperator'], get_author_name( $author_id ) ) . '" href="' . get_author_feed_link( $author_id ) . "\" />\n";
+	}
+
+	elseif ( is_search() ) {
+		echo '<link rel="alternate" type="' . feed_content_type() . '" title="' . sprintf( $args['searchtitle'], get_bloginfo('name'), $args['seperator'], get_search_query() ) . '" href="' . get_search_feed_link() . "\" />\n";
+	}
+}
+
+/**
  * Display the link to the Really Simple Discovery service endpoint.
  *
  * @link http://archipelago.phrasewise.com/rsd
@@ -1886,4 +1968,4 @@
 	return apply_filters( "get_the_generator_{$type}", $gen, $type );
 }
 
-?>
+?>
\ No newline at end of file
Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 10375)
+++ wp-includes/link-template.php	(working copy)
@@ -507,7 +507,7 @@
 	$permalink_structure = get_option('permalink_structure');
 
 	if ( '' == $permalink_structure ) {
-		$link = get_option('home') . "?feed=$feed&amp;cat=" . $cat_id;
+		$link = trailingslashit( get_option('home') ) . "?feed=$feed&amp;cat=" . $cat_id;
 	} else {
 		$link = get_category_link($cat_id);
 		if( $feed == get_default_feed() )
