Diffs not displayed inline in Gmail

Bug #401772 reported by Aaron Bentley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Unassigned

Bug Description

Diffs are not displayed inline by Gmail. It has been suggested that their encoding was the cause, but we have changed the encoding from base64 to quoted-printable, and they are still not displayed inline. Since Gmail will happily display text attachments that are in quoted-printable, it appears that, contrary to suggestions, the encoding was not to blame.

The Content-type and (lack of) its charset parameter are the most likely culprits. The charset cannot reasonably be supplied, because multiple encodings may be used for the files in a given diff. It's also possible that supplying a filename in the content-disposition causes this.

Tags: email lp-code

Related branches

Revision history for this message
Aaron Bentley (abentley) wrote :

Investigation suggests that Gmail uses the filename and content-type to determine whether to display the attachment inline.

If the file extension is '.txt', or the content-type is 'text/plain', the message is displayed inline. (It's not known which extensions are acceptable, but .patch and .diff have been determined unacceptable.)

We could override the content-type or file extension for gmail.com addresses, but that would not reach all gmail users, because some people use gmail to read mail for other domains.

If we try to use one message type for both gmail and conforming clients, it seems best to retain the content-type, since conforming clients will respect it, and set the filename such that it pleases gmail.

Finally, even when patches are displayed inline, they are displayed in a variable-width font, so they are not very readable. However, Gmail provides a "View" link that displays them in a fixed-width font.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 401772] Re: Diffs not displayed inline in Gmail

2009/7/22 Aaron Bentley <email address hidden>:

> Finally, even when patches are displayed inline, they are displayed in a
> variable-width font, so they are not very readable.

Like the way Launchpad loses leading indentation in merge proposals
and bug comments? :-)

--
Martin <http://launchpad.net/~mbp/>

Aaron Bentley (abentley)
Changed in launchpad-code:
status: Triaged → 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.