### Eclipse Workspace Patch 1.0
#P wordpress
Index: wp-includes/default-filters.php
===================================================================
--- wp-includes/default-filters.php	(revision 15308)
+++ wp-includes/default-filters.php	(working copy)
@@ -253,4 +253,7 @@
 add_action( 'admin_init', 'register_admin_color_schemes', 1);
 add_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );
 
+// HTTP Redirect Hypertext
+add_action( 'redirect_hypertext', 'wp_redirect_hypertext', 10, 3 );
+
 ?>
Index: wp-includes/pluggable.php
===================================================================
--- wp-includes/pluggable.php	(revision 15308)
+++ wp-includes/pluggable.php	(working copy)
@@ -869,29 +869,82 @@
  *
  * @param string $location The path to redirect to
  * @param int $status Status code to use
+ * @param bool $hyptertext Should a Hypertext Fragment be used?
  * @return bool False if $location is not set
  */
-function wp_redirect($location, $status = 302) {
+function wp_redirect( $location, $status = 302, $hypertext = true ) {
 	global $is_IIS;
 
-	$location = apply_filters('wp_redirect', $location, $status);
-	$status = apply_filters('wp_redirect_status', $status, $location);
+	$location  = apply_filters( 'wp_redirect', $location, $status );
+	$status    = (int) apply_filters( 'wp_redirect_status', $status, $location );
+	$hypertext = apply_filters( 'wp_redirect_hypertext', $hypertext, $status, $location);
 
 	if ( !$location ) // allows the wp_redirect filter to cancel a redirect
 		return false;
+		
+	if ( 3 != (int) ($status/100) ) // Handle HTTP redirect status 3xx only
+		return false;
 
-	$location = wp_sanitize_redirect($location);
+	$location = wp_sanitize_redirect( $location );
 
 	if ( $is_IIS ) {
-		header("Refresh: 0;url=$location");
+		header( "Refresh: 0;url=$location" );
 	} else {
 		if ( php_sapi_name() != 'cgi-fcgi' )
-			status_header($status); // This causes problems on IIS and some FastCGI setups
-		header("Location: $location", true, $status);
+			status_header( $status ); // This causes problems on IIS and some FastCGI setups
+		header( "Location: $location", true, $status );
 	}
+
+	// output a hypertext fragment? - sometimes wordpress needs to ignore the
+	// HTTP 1.1 suggestion to output a hypertext fragment on redirects, e.g. with
+	// plugin activation checks. 
+	if ( !$hypertext )
+		return;
+
+	// hyptertext should be output for certain methods / stati only
+	$method = $_SERVER['REQUEST_METHOD'];
+	$html   = ('HEAD' !== $method) && (301 === $status || 302 === $status || 303 === $status || 307 === $status);
+		
+	if ( !$html )
+		return;
+		
+	$hypertext = sprintf( '%s %s: <a href="%s">%s</a>', $status, esc_html( get_status_header_desc( $status ) ), esc_attr( $location ), esc_html( $location ) );
+	$hypertext = apply_filters( 'redirect_hypertext', $hypertext, $location, $status );
+	
+	echo $hypertext;
 }
 endif;
 
+if ( !function_exists('wp_redirect_hypertext') ) :
+/**
+ * Generate a Hypertext Fragment for a HTTP Redirect
+ *
+ * @since 3.1
+ *
+ * @param 
+ * @return hypertext fragment
+ */
+function wp_redirect_hypertext($hypertext, $location, $status) {	
+	$version = $GLOBALS['wp_version'];
+	list($link, $title, $description, $charset) = array_map('get_bloginfo', array('wpurl', 'name', 'description', 'charset'));
+	
+	$homepage = sprintf('<a href="%s">%s - %s</a>', esc_attr( $link ), esc_html( $title ), esc_html( $description ) );
+	
+	ob_start();
+?>
+<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=<?php echo $charset; ?>">
+<TITLE><?php echo $status; ?> Moved</TITLE></HEAD><BODY>
+<H1><?php echo $status; ?> <?php echo get_status_header_desc( $status ); ?></H1>
+The document has moved
+<A HREF="<?php echo esc_attr( $location ); ?>">here</A>.
+<HR>
+<address>WordPress/<?php echo esc_html( $version ); ?> at <?php echo $homepage; ?>.</address>
+</BODY></HTML>
+<?php
+	return ob_get_clean();
+}
+endif;
+
 if ( !function_exists('wp_sanitize_redirect') ) :
 /**
  * Sanitizes a URL for use in a redirect.
Index: wp-admin/includes/plugin.php
===================================================================
--- wp-admin/includes/plugin.php	(revision 15308)
+++ wp-admin/includes/plugin.php	(working copy)
@@ -479,7 +479,7 @@
 
 	if ( !in_array($plugin, $current) ) {
 		if ( !empty($redirect) )
-			wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); // we'll override this later if the plugin can be included without fatal error
+			wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect), 302, false); // we'll override this later if the plugin can be included without fatal error
 		ob_start();
 		include(WP_PLUGIN_DIR . '/' . $plugin);
 		do_action( 'activate_plugin', trim( $plugin) );
