From e5352f1262509c3539b122a2e54d628f3b73a986 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 26 Sep 2006 00:55:58 +0000 Subject: [PATCH] Send 302 on redirect. Props leflo. fixes #3166 git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4253 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable-functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/pluggable-functions.php b/wp-includes/pluggable-functions.php index af734c02b6..aabadc0504 100644 --- a/wp-includes/pluggable-functions.php +++ b/wp-includes/pluggable-functions.php @@ -258,7 +258,7 @@ endif; // Cookie safe redirect. Works around IIS Set-Cookie bug. // http://support.microsoft.com/kb/q176113/ if ( !function_exists('wp_redirect') ) : -function wp_redirect($location) { +function wp_redirect($location, $status = 302) { global $is_IIS; $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location); @@ -266,6 +266,8 @@ function wp_redirect($location) { $strip = array('%0d', '%0a'); $location = str_replace($strip, '', $location); + status_header($status); + if ($is_IIS) header("Refresh: 0;url=$location"); else