Edgewall Software
Modify

Ticket #3428 (closed defect: duplicate)

Opened 6 years ago

Last modified 3 years ago

Trac attempts to diff non-text files

Reported by: daniel.m.church@… Owned by: cmlenz
Priority: normal Milestone:
Component: version control Version: 0.9.6
Severity: normal Keywords:
Cc:
Release Notes:
API Changes:

Description

When viewing a changeset, Trac will attempt to perform a diff on any file where none of the first 1000 bytes are the null byte (0x00). This causes the server to hang when viewing a changeset on large (>~16MB) binary files that do not happen to have a null byte in the first 1000 bytes.

Created a patch (trac-mimetype-no-binary-diff.patch) to prevent Trac from attempting to perform a diff on files that have the svn:mime-type property set to something other than "text/*".

Attachments

trac-mimetype-no-binary-diff.patch (1.4 KB) - added by daniel.m.church@… 6 years ago.
trac-mimetype-no-binary-diff.patch

Download all attachments as: .zip

Change History

Changed 6 years ago by daniel.m.church@…

trac-mimetype-no-binary-diff.patch

comment:1 Changed 6 years ago by cmlenz

That won't work because some a number of common text formats don't use the text/* super-type. Examples: application/xml and image/svg.

comment:2 Changed 6 years ago by eblot

See also wiki:TracIniMacro#changeset-section that enables the admin to limit the size of a diff'ed changeset.

comment:3 Changed 6 years ago by cboos

  • Resolution set to duplicate
  • Status changed from new to closed

This problem is already handled by the patches in #3332.

comment:4 Changed 3 years ago by cboos

See rather #2672 for this specific issue.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cmlenz. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.