WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#17256 closed defect (bug) (fixed)

Image-error in Multisite (subdir)

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

Description

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

with

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

Attachments (1)

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

Download all attachments as: .zip

Change History (9)

comment:1 scribu3 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.

Version 0, edited 3 years ago by scribu (next)

comment:2 dvwallin3 years ago

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

comment:3 scribu3 years ago

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

comment:4 dvwallin3 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.

comment:5 kawauso3 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.

comment:6 scribu3 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.

comment:7 ryan3 years ago

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

comment:8 ryan3 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.