Changeset 2623 for trunk/wp-blog-header.php
- Timestamp:
- 06/09/2005 12:17:43 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.