debdiff shown as html

Reported by Onkar Shinde on 2008-05-10
6
Affects Status Importance Assigned to Milestone
Launchpad itself
Undecided
Gavin Panella
mime-support (Ubuntu)
Undecided
Unassigned
Nominated for Intrepid by Gavin Panella

Bug Description

For some time debdiff attached to bug reports are shown as html instead of plain text. This makes it really hard to read it.

Please find attached a screenshot.

Workaround: set the attachment file type manually.

Onkar Shinde (onkarshinde) wrote :
Diogo Matsubara (matsubara) wrote :

Hi, Onkar,
thanks for the report. Can you point out the bug report where you found that link?

Changed in launchpad:
status: New → Incomplete
Onkar Shinde (onkarshinde) wrote :

Diogo,

The bug in question is #227038. The problem is not present now as the type for attachment was changed to text/plain by Michael Bienia (https://edge.launchpad.net/~geser) when he wanted to review it.

As of now I only have one another bug present that has debdiff attached - #229577. The problem is not present there either. So either it has been fixed already on edge or launchpad is assigning text/html type at random.

Hope this helps.

Changed in malone:
status: Incomplete → New
Diogo Matsubara (matsubara) wrote :

Attaching the debdiff wrongly recognized as html.

Diogo Matsubara (matsubara) wrote :

Now attaching the same debdiff with the html change inside the diff removed. The code to recognize file type is probably getting confused by the content.

Changed in malone:
status: New → Confirmed
description: updated
Sebastien Bacher (seb128) wrote :

the issue happens on a lot of bugs, the changes attached to launchpad bugs are mostly text so maybe that should be default option?

Gavin Panella (allenap) wrote :

Fixable - though it may not be the best solution - by calling `mimetypes.add_type('text/x-diff', '.debdiff')` at some point before guessing the content type.

Gavin Panella (allenap) on 2008-07-04
Changed in malone:
assignee: nobody → allenap
milestone: none → 1.99
status: Confirmed → In Progress
Gavin Panella (allenap) wrote :

This issue could also be solved by adding .debdiff to /etc/mime.types (as equivalent to .diff -> text/x-diff). We'll add a fix to Launchpad in the meantime too.

Gavin Panella (allenap) wrote :

In RF 6633.

Changed in malone:
status: In Progress → Fix Committed
Gavin Panella (allenap) wrote :

The fix in Launchpad sets the content type of new .debdiff uploads to text/plain, because seb128 discovered that Firefox does not display text/x-diff (which is probably the more appropriate choice of content type for debdiff output) in-browser. Even once /etc/mime.types has been updated (assuming text/x-diff is chosen), we'll keep the text/plain behaviour until Firefox displays text/x-diff in-browser by default, or until it becomes easier (or possible? I couldn't figure out how to change the default) to get Firefox to display it in-browser.

Matthew Paul Thomas (mpt) wrote :

This appears to be a duplicate of bug 34758.

On Sun, Jul 06, 2008 at 04:44:40PM -0000, Matthew Paul Thomas wrote:
> This appears to be a duplicate of bug 34758.

Not quite. This bug has been fixed, while bug 34758 is still unfixed.

Changed in malone:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui) on 2009-10-09
tags: added: tech-debt
Thomas Hotz (thotz) on 2013-06-07
Changed in mime-support (Ubuntu):
status: New → Confirmed
Charles Plessy (plessy) wrote :

Closing in mime-support as the bug was about Launchpad serving the wrong media type.

Changed in mime-support (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers