[wp-trac] [WordPress Trac] #40631: Safari issues with wp-includes/ms-files.php

WordPress Trac noreply at wordpress.org
Tue May 2 07:33:45 UTC 2017


#40631: Safari issues with wp-includes/ms-files.php
--------------------------+-----------------------------
 Reporter:  Brandicoot    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.7.4
 Severity:  normal        |   Keywords:
  Focuses:  multisite     |
--------------------------+-----------------------------
 We have a multi-site network with over 200 sites on it.

 Whilst the network is running WP 4.7.4–en_AU  the network was originally
 built on a version prior to 3.5 and has been continually updated as
 versions become available.  That being said, our network still uses the
 old file structure wp-content/blogs.dir/[site#]/files to store media.
 I've tried converting this over with no success and haven't really been
 able to find any good resources to help me do this beyond the things I've
 tried.

 So, our network continues to use the above path with the compatibility
 option of using wp-includes/ms-files.php which is called in the .htaccess
 file.

 However, there seems to be a bug in the ms-files.php that are causing some
 resources not to load properly when the sites are loaded into Safari or an
 iOS device.

 1.  PDF documents fail to load
 2. CSS files that have been cached by our theme (it has it's own caching
 function) also fail to load.

 I've narrowed down the culprit to the lines of code in ms-file.php that
 output the headers.  If I comment out the code on line 43:

 {{{#!php
 header( 'Content-Length: ' . filesize( $file ) );
 }}}

 ...then the problem goes away.  Not sure what impact commenting the above
 has but it doesn't seem to break the site so I've left it commented out.

 My best guess is that Safari doesn't like this header being sent out
 separately from the earlier one on line 41.  It may even be a bug with
 Safari - not sure on this one.

 Anyway, thought I'd report it here to begin with.

 Cheers
 Chris

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40631>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list