FS#4831 - Change web server mime type for .diff

Attached to Project: Rockbox
Opened by Fredrik Öhrn (ohrn) - Tuesday, 14 March 2006, 11:45 GMT
Last edited by Maurus Cuelenaere (mcuelenaere) - Tuesday, 15 December 2009, 11:53 GMT
Task Type Bugs
Category Utils
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Files with a .diff extention are sent as octet stream, changing it to text/plain instead makes quick inspection of patches much easier.
This task depends upon

Closed by  Maurus Cuelenaere (mcuelenaere)
Tuesday, 15 December 2009, 11:53 GMT
Reason for closing:  Works For Me
Additional comments about closing:  This seems to be resolved.
Comment by Björn Stenberg (zagor) - Sunday, 19 March 2006, 15:26 GMT
It doesn't actually set octetstream automatically, it assignes different mime types depending on the contents of the file.

I agree it's an annoying behaviour (excarbated strongly by Firefox' lack of "view in browser") but I currently don't know how to fix it. (Did a quick peek in the flyspray source but couldn't find where it's figuring out the type.)
Comment by Fredrik Öhrn (ohrn) - Sunday, 19 March 2006, 21:49 GMT
OK, I figured it out. Flyspray takes the mime type supplied by the uploading browser and sticks it into the database (scripts/modify.php, line 1175). When someone downloads the file it blindly sends the stored mime type (index.php lines 102-130).

Since most browsers know jack shit about the file they are uploading they play is safe and send application/octet-stream.

It'll require some major surgery ro fix this silly behaviour, I guess I'll just have to go to Flyspray's site and complain loudly...
Comment by Fredrik Öhrn (ohrn) - Sunday, 19 March 2006, 21:51 GMT
Well, associating .diff with text files didn't help, Firefox still uploads them as a binary file.
Comment by Peter D'Hoye (petur) - Friday, 03 August 2007, 20:40 GMT
/me pokes Bjorn
Comment by Peter D'Hoye (petur) - Friday, 12 December 2008, 18:24 GMT
so this is now a battery/charging issue? Great!
Comment by Marc Guay (Marc_Guay) - Friday, 12 December 2008, 21:55 GMT
Fun! The change was actually from Feature Request to Bug so that it wasn't lost in the sea, and there's no category for Flyspray-related items.
Comment by Maurus Cuelenaere (mcuelenaere) - Monday, 27 July 2009, 15:09 GMT
Isn't this solved now?

I haven't seen any new diffs with the wrong mime type lately..