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
Change History
Changed 6 years ago by daniel.m.church@…
- Attachment trac-mimetype-no-binary-diff.patch added
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.



trac-mimetype-no-binary-diff.patch