Opened 11 years ago
Closed 9 years ago
#151 closed defect (bug) (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 )
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: 11248Linked 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)
#3
follow-up:
↓ 4
@
11 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
@
11 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.
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.