Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-files.php

    r16632 r14609  
    3030}
    3131
    32 $mime = wp_check_filetype( $file );
     32$mime = wp_check_filetype( $_SERVER[ 'REQUEST_URI' ] );
    3333if( false === $mime[ 'type' ] && function_exists( 'mime_content_type' ) )
    3434    $mime[ 'type' ] = mime_content_type( $file );
     
    3737    $mimetype = $mime[ 'type' ];
    3838else
    39     $mimetype = 'image/' . substr( $file, strrpos( $file, '.' ) + 1 );
     39    $mimetype = 'image/' . substr( $_SERVER[ 'REQUEST_URI' ], strrpos( $_SERVER[ 'REQUEST_URI' ], '.' ) + 1 );
    4040
    4141header( 'Content-type: ' . $mimetype ); // always send this
Note: See TracChangeset for help on using the changeset viewer.