Changeset 47122 for trunk/src/wp-includes/ms-files.php
- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/ms-files.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-files.php
r42343 r47122 42 42 } 43 43 44 header( 'Content-Type: ' . $mimetype ); // always send this44 header( 'Content-Type: ' . $mimetype ); // Always send this. 45 45 if ( false === strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) ) { 46 46 header( 'Content-Length: ' . filesize( $file ) ); 47 47 } 48 48 49 // Optional support for X-Sendfile and X-Accel-Redirect 49 // Optional support for X-Sendfile and X-Accel-Redirect. 50 50 if ( WPMU_ACCEL_REDIRECT ) { 51 51 header( 'X-Accel-Redirect: ' . str_replace( WP_CONTENT_DIR, '', $file ) ); … … 62 62 header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 100000000 ) . ' GMT' ); 63 63 64 // Support for Conditional GET - use stripslashes to avoid formatting.php dependency64 // Support for conditional GET - use stripslashes() to avoid formatting.php dependency. 65 65 $client_etag = isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) ? stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) : false; 66 66 … … 70 70 71 71 $client_last_modified = trim( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ); 72 // If string is empty, return 0. If not, attempt to parse into a timestamp 72 // If string is empty, return 0. If not, attempt to parse into a timestamp. 73 73 $client_modified_timestamp = $client_last_modified ? strtotime( $client_last_modified ) : 0; 74 74 … … 84 84 } 85 85 86 // If we made it this far, just serve the file 86 // If we made it this far, just serve the file. 87 87 readfile( $file ); 88 88 flush();
Note: See TracChangeset
for help on using the changeset viewer.