Modify ↓
Opened 19 years ago
Closed 18 years ago
#2925 closed defect (fixed)
[PATCH] send /changeset/$ID?format=diff with correct mimetype
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | general | Version: | 0.9.4 |
Severity: | minor | Keywords: | patch |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Hi,
this trivial patch allows the unified diffs to be downloaded as text/x-patch instead of text/plain, thus allowing people who have this mimetype handled by Kompare or similar to get it where they want.
HTH, Colin
--- trac/versioncontrol/web_ui/changeset.py.orig 2006-03-23 12:03:01.000000000 +0100 +++ trac/versioncontrol/web_ui/changeset.py 2006-03-23 12:01:31.000000000 +0100 @@ -260,7 +260,7 @@ def _render_diff(self, req, repos, chgset, diff_options): """Raw Unified Diff version""" req.send_response(200) - req.send_header('Content-Type', 'text/plain;charset=utf-8') + req.send_header('Content-Type', 'text/x-patch;charset=utf-8') req.send_header('Content-Disposition', 'inline;' 'filename=Changeset%s.diff' % chgset.rev) req.end_headers()
Attachments (1)
Change History (4)
by , 19 years ago
Attachment: | trac.x-patch.patch added |
---|
comment:1 by , 19 years ago
Description: | modified (diff) |
---|
(quoting the patch in the description hint: use Preview :))
comment:2 by , 18 years ago
Milestone: | → 0.11 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Not every browser will be happy with this change, but I guess now that we have the Tabular / Unified switch in the HTML diff view, it's not that important anymore.
Note:
See TracTickets
for help on using tickets.
Non-broken patch.