Edgewall Software
Modify

Opened 19 years ago

Closed 18 years ago

#2925 closed defect (fixed)

[PATCH] send /changeset/$ID?format=diff with correct mimetype

Reported by: colin.leroy@… 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 Christian Boos)

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)

trac.x-patch.patch (612 bytes ) - added by anonymous 19 years ago.
Non-broken patch.

Download all attachments as: .zip

Change History (4)

by anonymous, 19 years ago

Attachment: trac.x-patch.patch added

Non-broken patch.

comment:1 by Christian Boos, 19 years ago

Description: modified (diff)

(quoting the patch in the description hint: use Preview :))

comment:2 by Christian Boos, 18 years ago

Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos
Status: newassigned

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.

comment:3 by Christian Boos, 18 years ago

Resolution: fixed
Status: assignedclosed

Done in r4945.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.