debdiff shown as html

Bug #229040 reported by Onkar Shinde
6
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Undecided
Gavin Panella
mime-support (Ubuntu)
Fix Released
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.

Revision history for this message
Onkar Shinde (onkarshinde) wrote :
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Diogo Matsubara (matsubara) wrote :

Attaching the debdiff wrongly recognized as html.

Revision history for this message
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
Revision history for this message
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?

Revision history for this message
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)
Changed in malone:
assignee: nobody → allenap
milestone: none → 1.99
status: Confirmed → In Progress
Revision history for this message
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.

Revision history for this message
Gavin Panella (allenap) wrote :

In RF 6633.

Changed in malone:
status: In Progress → Fix Committed
Revision history for this message
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.

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

This appears to be a duplicate of bug 34758.

Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 229040] Re: debdiff shown as html

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)
tags: added: tech-debt
Changed in mime-support (Ubuntu):
status: New → Confirmed
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.