Changeset 2623
- Timestamp:
- 06/09/2005 12:17:43 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin.php
r2592 r2623 8 8 auth_redirect(); 9 9 10 header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); 11 header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 12 header('Cache-Control: no-cache, must-revalidate, max-age=0'); 13 header('Pragma: no-cache'); 10 nocache_headers(); 14 11 15 12 update_category_cache(); -
trunk/wp-blog-header.php
r2600 r2623 108 108 109 109 // Sending HTTP headers 110 @header('X-Pingback: '. get_bloginfo('pingback_url')); 110 111 111 112 if ( !empty($error) && '404' == $error ) { 112 if ( preg_match('/cgi/', php_sapi_name()) ) 113 @header('Status: 404 Not Found'); 114 else 115 @header('HTTP/1.x 404 Not Found'); 113 status_header( 404 ); 116 114 } else if ( empty($feed) ) { 117 @header('X-Pingback: '. get_bloginfo('pingback_url'));118 115 @header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 119 116 } else { … … 126 123 @header("Last-Modified: $wp_last_modified"); 127 124 @header("ETag: $wp_etag"); 128 @header('X-Pingback: ' . get_bloginfo('pingback_url'));129 125 130 126 // Support for Conditional GET … … 142 138 (($client_modified_timestamp >= $wp_modified_timestamp) && ($client_etag == $wp_etag)) : 143 139 (($client_modified_timestamp >= $wp_modified_timestamp) || ($client_etag == $wp_etag)) ) { 144 if ( preg_match('/cgi/',php_sapi_name()) ) { 145 header('Status: 304 Not Modified'); 146 echo "\r\n\r\n"; 147 exit; 148 } else { 149 if ( version_compare(phpversion(), '4.3.0', '>=') ) 150 header('Not Modified', TRUE, 304); 151 else 152 header('HTTP/1.x 304 Not Modified'); 153 exit; 154 } 140 status_header( 304 ); 141 exit; 155 142 } 156 143 } … … 192 179 (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) { 193 180 $wp_query->is_404 = true; 194 if ( preg_match('/cgi/', php_sapi_name()) ) 195 @header('Status: 404 Not Found'); 196 else 197 @header('HTTP/1.x 404 Not Found'); 181 status_header( 404 ); 182 } else { 183 status_header( 200 ); 198 184 } 199 185 -
trunk/wp-comments-post.php
r2580 r2623 53 53 setcookie('comment_author_url_' . COOKIEHASH, stripslashes($comment_author_url), time() + 30000000, COOKIEPATH); 54 54 55 header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); 56 header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 57 header('Cache-Control: no-cache, must-revalidate, max-age=0'); 58 header('Pragma: no-cache'); 55 nocache_headers(); 59 56 60 57 $location = (empty($_POST['redirect_to'])) ? $_SERVER["HTTP_REFERER"] : $_POST['redirect_to']; -
trunk/wp-includes/functions.php
r2616 r2623 1850 1850 } 1851 1851 1852 function status_header( $header ) { 1853 if ( 200 == $header ) { 1854 $text = 'OK'; 1855 } elseif ( 301 == $header ) { 1856 $text = 'Moved Permanently'; 1857 } elseif ( 302 == $header ) { 1858 $text = 'Moved Temporarily'; 1859 } elseif ( 304 == $header ) { 1860 $text = 'Not Modified'; 1861 } elseif ( 404 == $header ) { 1862 $text = 'Not Found'; 1863 } elseif ( 410 == $header ) { 1864 $text = 'Gone'; 1865 } 1866 if ( preg_match('/cgi/',php_sapi_name()) ) { 1867 @header("Status: $header $text"); 1868 echo "\r\n\r\n"; 1869 } else { 1870 if ( version_compare(phpversion(), '4.3.0', '>=') ) 1871 @header($text, TRUE, $header); 1872 else 1873 @header("HTTP/1.x $header $text"); 1874 } 1875 } 1876 1877 function nocache_headers() { 1878 @ header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); 1879 @ header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 1880 @ header('Cache-Control: no-cache, must-revalidate, max-age=0'); 1881 @ header('Pragma: no-cache'); 1882 } 1883 1852 1884 ?> -
trunk/wp-includes/pluggable-functions.php
r2607 r2623 107 107 !wp_login($_COOKIE['wordpressuser_' . COOKIEHASH], $_COOKIE['wordpresspass_' . COOKIEHASH], true)) || 108 108 (empty($_COOKIE['wordpressuser_' . COOKIEHASH])) ) { 109 header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); 110 header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 111 header('Cache-Control: no-cache, must-revalidate, max-age=0'); 112 header('Pragma: no-cache'); 109 nocache_headers(); 113 110 114 111 header('Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI'])); -
trunk/wp-login.php
r2552 r2623 5 5 $error = ''; 6 6 7 header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); 8 header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 9 header('Cache-Control: no-cache, must-revalidate'); 10 header('Pragma: no-cache'); 7 nocache_headers(); 8 11 9 header('Content-Type: '.get_bloginfo('html_type').'; charset='.get_bloginfo('charset')); 12 10 … … 25 23 wp_clearcookie(); 26 24 do_action('wp_logout'); 27 header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); 28 header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 29 header('Cache-Control: no-cache, must-revalidate, max-age=0'); 30 header('Pragma: no-cache'); 25 nocache_headers(); 31 26 wp_redirect('wp-login.php'); 32 27 exit();
Note: See TracChangeset
for help on using the changeset viewer.