| 1 | diff --git a/wp-includes/ms-files.php b/wp-includes/ms-files.php |
|---|
| 2 | index f5af8e0..5ec6d1d 100644 |
|---|
| 3 | --- a/wp-includes/ms-files.php |
|---|
| 4 | +++ b/wp-includes/ms-files.php |
|---|
| 5 | @@ -29,14 +29,14 @@ if ( !is_file( $file ) ) { |
|---|
| 6 | die( '404 — File not found.' ); |
|---|
| 7 | } |
|---|
| 8 | |
|---|
| 9 | -$mime = wp_check_filetype( $_SERVER[ 'REQUEST_URI' ] ); |
|---|
| 10 | +$mime = wp_check_filetype( $file ); |
|---|
| 11 | if( false === $mime[ 'type' ] && function_exists( 'mime_content_type' ) ) |
|---|
| 12 | $mime[ 'type' ] = mime_content_type( $file ); |
|---|
| 13 | |
|---|
| 14 | if( $mime[ 'type' ] ) |
|---|
| 15 | $mimetype = $mime[ 'type' ]; |
|---|
| 16 | else |
|---|
| 17 | - $mimetype = 'image/' . substr( $_SERVER[ 'REQUEST_URI' ], strrpos( $_SERVER[ 'REQUEST_URI' ], '.' ) + 1 ); |
|---|
| 18 | + $mimetype = 'image/' . substr( $file, strrpos( $file, '.' ) + 1 ); |
|---|
| 19 | |
|---|
| 20 | header( 'Content-type: ' . $mimetype ); // always send this |
|---|
| 21 | if ( false === strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) ) |
|---|