Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#17256 closed defect (bug) (fixed)

Image-error in Multisite (subdir)

Reported by: dvwallin's profile dvwallin Owned by: ryan's profile ryan
Milestone: 3.2 Priority: normal
Severity: normal Version: 3.1
Component: Multisite Keywords: has-patch
Focuses: Cc:


When setting up a multisite-network using subdirectory-method in Wordpress 3.1.x images get the wrong encoding and doesn't show up anywhere.

This is due to the header-setting being wrong in ms-files.php where, to solve the issue, you simply replace

header( 'Content-type: ' . $mimetype ); always send this


header("Content-Type: $mimetype"); always send this

Attachments (1)

patch_commit_2850cf365c47.patch (521 bytes) - added by dvwallin 13 years ago.

Download all attachments as: .zip

Change History (9)

#1 @scribu
13 years ago

  • Keywords has-patch removed

Those two lines of code are equivalent. The resulting string that's sent to the header() function is the same.

To test:

var_dump( 'Content-type: ' . $mimetype );

var_dump( "Content-Type: $mimetype" );
Last edited 13 years ago by scribu (previous) (diff)

#2 @dvwallin
13 years ago

I know but for some reason the later one worked and the first one did not.

#3 @scribu
13 years ago

No, something else has to be going on. Maybe you're testing different URLs.

#4 @dvwallin
13 years ago

Not at all. Been quite detailed in the tests. Changing that single line made the image-handling work throughout the multisite-setup. But i wont push for the patch. I'm using it and it works for me.

#5 @kawauso
13 years ago

The difference isn't in the concatenation method, it's the capitalisation of 'Type'.

I couldn't reproduce the issue, but some searching does suggest that some badly written applications may expect Content-Type only.

#6 @scribu
13 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.2
  • Severity changed from blocker to normal

Ha, I knew it was something else. Thanks, kawauso.

#7 @ryan
13 years ago

We use Content-Type everywhere else, might as well be consistent.

#8 @ryan
13 years ago

  • Owner set to ryan
  • Resolution set to fixed
  • Status changed from new to closed

In [17922]:

s/Content-type/Content-Type/. Props dvwallin. fixes #17256

Note: See TracTickets for help on using tickets.