]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/ms-files.php
Wordpress 3.0.2-scripts
[autoinstalls/wordpress.git] / wp-includes / ms-files.php
index f5af8e0370ac2903ce9687f7f2cf9b26162b34a3..5ec6d1ddc1aea9d7d60d9780fa15f3430e1bc9f7 100644 (file)
@@ -29,14 +29,14 @@ if ( !is_file( $file ) ) {
        die( '404 — File not found.' );
 }
 
        die( '404 — File not found.' );
 }
 
-$mime = wp_check_filetype( $_SERVER[ 'REQUEST_URI' ] );
+$mime = wp_check_filetype( $file );
 if( false === $mime[ 'type' ] && function_exists( 'mime_content_type' ) )
        $mime[ 'type' ] = mime_content_type( $file );
 
 if( $mime[ 'type' ] )
        $mimetype = $mime[ 'type' ];
 else
 if( false === $mime[ 'type' ] && function_exists( 'mime_content_type' ) )
        $mime[ 'type' ] = mime_content_type( $file );
 
 if( $mime[ 'type' ] )
        $mimetype = $mime[ 'type' ];
 else
-       $mimetype = 'image/' . substr( $_SERVER[ 'REQUEST_URI' ], strrpos( $_SERVER[ 'REQUEST_URI' ], '.' ) + 1 );
+       $mimetype = 'image/' . substr( $file, strrpos( $file, '.' ) + 1 );
 
 header( 'Content-type: ' . $mimetype ); // always send this
 if ( false === strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) )
 
 header( 'Content-type: ' . $mimetype ); // always send this
 if ( false === strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) )