WordPress.org

Making WordPress.org

Opened 6 years ago

Closed 3 years ago

#151 closed defect (wontfix)

Plugin images are sent with wrong Content-Type

Reported by: toscho Owned by:
Milestone: Priority: low
Component: Plugin Directory Keywords:
Cc:

Description (last modified by samuelsidler)

Migrated from #wp23411:

Some images are sent with the Content-Type application/octet-stream.

Example: http://s-plugins.wordpress.org/buddypress/assets/screenshot-1.gif?rev=626668

HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Type: application/octet-stream
Date: Thu, 07 Feb 2013 09:18:48 GMT
ETag: "626668//buddypress/assets/screenshot-1.gif"
Last-Modified: Sun, 18 Nov 2012 17:27:41 GMT
Server: ECS (fcn/419A)
X-Cache: HIT
Content-Length: 11248

Linked from http://wordpress.org/extend/plugins/buddypress/screenshots/

Each time I want to load the pure image I get a download dialog in my browser.

Otto says this is hard to fix.

Change History (7)

#1 @samuelsidler
6 years ago

  • Description modified (diff)

#2 @nacin
6 years ago

Because we use DAV, this is purely based on svn:mime-type. If the right mime type is set for the image, then accessing it over http://plugins.svn.wordpress.org/ will return the right mime type, and the s-plugins mirror will mirror the same mime type. I have no idea if it is possible to force a mime type on that mirror based on file extension, but it's pretty "dumb" — I'd imagine not. I guess it is possible to do this in Apache, but again, DAV makes things weird.

Wontfix? Serving application/octet-stream isn't a dealbreaker, forcing svn:mime-type on pre-commit is lame, and I'd rather not write a bot for it. Systems might have another idea but I doubt it.

#3 follow-up: @toscho
6 years ago

  • Cc toscho added

I don’t know much about SVN, so just for clarification: Can the plugin author set the proper MIME type in her/his own repository per SVN? In that case, a short how-to on the developer SVN page would be helpful.

#4 in reply to: ↑ 3 @samuelsidler
6 years ago

Replying to nacin:

Wontfix? Serving application/octet-stream isn't a dealbreaker, forcing svn:mime-type on pre-commit is lame, and I'd rather not write a bot for it. Systems might have another idea but I doubt it.

Why is it lame to force it on pre-commit? For a select set of filetypes, I don't see it as a bad thing.

Replying to toscho:

I don’t know much about SVN, so just for clarification: Can the plugin author set the proper MIME type in her/his own repository per SVN? In that case, a short how-to on the developer SVN page would be helpful.

Should be able to, yes.

This command should do it:

svn propset svn:mime-type image/png *.png
svn propset svn:mime-type image/jpeg *.jpg

Alternatively, plugin authors can set this in their ~/.subversion/config file:

*.png = svn:mime-type=image/png
*.jpg = svn:mime-type=image/jpeg

That'll apply to only new files though. Fixing already-committed files will require the command above.

#5 @Otto42
4 years ago

#587 was marked as a duplicate.

This ticket was mentioned in Slack in #meta by ocean90. View the logs.


3 years ago

#7 @samuelsidler
3 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Info on fixing this now exists here, though it's still up to the plugin author to handle.

There's really not much we can do here without a pre-commit hook, which doesn't seem worth it for the few times it comes up.

Note: See TracTickets for help on using tickets.